Jump to content

Why doesn't this css work


rv20

Recommended Posts

I have a form with some input text fields all within two divs wth class names "main" and "main_reg" both divs and the input field use inline css(i don't even know if you should apply inline css to a input text field?? maybe thats where the problem is??)

 

So if i do this,

 

input{background-color:#0C6;}

  then it changes the bgc of the input as this css sets ALL inputs to whatever css you give it but if i do,

 

#main_reg input{background-color:#0C6;}

  then it has no effect , i thought this was the right syntax??

 

<div style=
    "border:solid;width:1000px;height:500px; background-color:#fff"
    class="main">
  <div style ="margin:0 auto;width:600px;height:400px;" class = "main_reg">

  <form>
      Username:
      <input type="text" id="reg_user" name="reg_user" size="30px"
            style="font-size: 100%;margin-left:37px;" />
</form>
</div>
</div>

Link to comment
https://forums.phpfreaks.com/topic/160621-why-doesnt-this-css-work/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.