Log in

View Full Version : style doesn't apply to the corresponding element?



GoogleQuality
07-27-2008, 08:46 AM
hi
i have a div which contains some form elements and i have attached a style to it, the problem is that the style doesn't work for the element assigned to it



<form action="../'.$_GET['lang'].'/index.php?lang='.$_GET['lang'].'&type=career" method="post" ENCTYPE="multipart/form-data">
<div class="cv">
<ul>
<li>Name:</li>
<li><input type="text" name="guest" size="25"></li>
</ul>
<ul>
<li>Your Email:</li>
<li><input type="text" name="guest" size="25"></li>
</ul>
<ul>
<li>Additional Notes :</li>
<li><textarea cols="30" rows="4" name="comment"></textarea></li>
</ul>
<ul>
<li>CV location:</li>
<li><input type="file" name="file" size="30"></li><li> <input type="submit" value="send" name="submit"></li>
</ul>
</div>
</form>




css class



div.cv ul li
{
display:inline;
list-style:none;
}


any suggestions or help please

Nile
07-27-2008, 01:14 PM
I don't see how it doesn't apply. There <li>s are sitting next to eachother, and then they make a line break... Whats wrong?

GoogleQuality
07-27-2008, 06:47 PM
that's what i'm talking about , it's too strange

the result data will be as if it was with no style: like this

* Name
*|textbox|

*your email
*|textbox|
...
...
..
i didn't know what is the wrong with this code.!

Medyman
07-28-2008, 01:44 PM
that's what i'm talking about , it's too strange

the result data will be as if it was with no style: like this

* Name
*|textbox|

*your email
*|textbox|
...
...
..
i didn't know what is the wrong with this code.!

What other styles do you have on the page applied to anything related with the form? It sounds like something is overriding it because there is nothing wrong with the CSS you posted. It even works in IE6 :p.