1 reply [Last post]
zak
Offline
newbie
Last seen: 16 years 37 weeks ago
Joined: 2003-12-01
Posts: 6
Points: 0

I am having trouble with a <div> tag for a user poll which works fine in ie6, netscape 6 but in Mozilla becomes about 250 pixels wide. The column is sized at 160 pixels.

Can anyone shed some light on this Smile

also, will div tags used in this type of way work in the other browsers?....Is it possible to define the width and or height in css and not in a table cell?

thanks,
zak

<link href="userpoll.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="poll">

<ul>
<li>
<INPUT type=radio value=9 name=voteID>
Antigua</a></li>
<li>
<li>
<INPUT type=radio value=9 name=voteID>
Antigua</a></li>
</ul>
<INPUT type=submit value=Vote><br><br>

<A href="http://www.url.com/modules.php?name="Surveys">Results
Polls</A><BR>
<BR>Votes:
280 <BR>
Comments: 0 </div>

css style

ul {
list-style-type: none;
left: 0px;
clear: left;

}
#poll {
width: 160px;
border: 1px solid #333333;
background-color: #E1E1E1;
padding: 20px;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
line-height: 12px;

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 39 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

&lt;div&gt; with ul &amp; li _css_widens in Mozilla

Can you provide a link so we can see it in action. Without see the exact code and the css in action its impossible to exactly tell what is going on. For example does your page have a doc type.

From the code you have shown below, it does look like it could be cleaned up a bit. You have ending </a> tags with no beginning and list tags <li> without ends. You could try that to see if it makes a difference.

Regards
Day

The only way to learn is to do it yourself