Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor server component not applying css styles to html elements

$
0
0

I am new to Blazor, we have a Blazor server application, created a component with InteractiveServer mode.I am trying to create a auto completed text box with custom CSS styles but some reason styles are not affected at all.Here is how code looks like, No matter what background color i give Datalist is not affected and showing default styles.

<style>datalist {  position: absolute;  background-color: white;  border: 1px solid blue;  border-radius: 0 0 5px 5px;  border-top: none;  font-family: sans-serif;  width: 350px;  padding: 5px;}option {  background-color: white;  padding: 4px;  color: blue;  margin-bottom: 1px;   font-size: 18px;  cursor: pointer;}</style><input autocomplete="off" list="" id="input" name="browsers" placeholder="Select your fav browser"><datalist id="browsers"><option value="Internet Explorer">Internet Explorer</option><option value="Chrome">Chrome</option><option value="Safari">Safari</option><option value="Microsoft Edge">Microsoft Edge</option><option value="Firefox">Firefox</option></datalist>

I tried adding !important to all css properties still didn't work.We want to customize datalist to our needs.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>