Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CSS width only works in IE

0 views
Skip to first unread message

McKirahan

unread,
Jun 29, 2005, 11:56:12 AM6/29/05
to
Can someone tell me why the following displays
differently in IE and FF? (And how to fix it.)

I use CSS to assign a width of 520 pixels to a cell
inside of a table that is 530 pixels wide.

IE5.5 shows it correctly; FF1.4 ignores "width:520px;".

(NS6.2 does't handle it correctly either.)

There's no difference if I the <td> has
width="520"

Thanks in advance.

<html>
<head>
<title>width520.htm</title>
<style type="text/css">
.pink {
font-family:Arial,Helvetica;
font-size:10pt;
font-weight:bold;
background-color:#FBE9F4;
width:520px;
height:20px;
border:solid
1px black }
</style>
</head>
<body>
<table bgcolor="#FFFFFF" border="0"
cellspacing="0" cellpadding="6" width="530"
style="border:solid 2px black">
<tr>
<td colspan="3" height="40" valign="middle">
<span class="pink">
&nbsp; &#164 &nbsp; Information . . . &nbsp;
</span>
</td>
</tr>
</table>
</body>
</html>

Is "width" only supported by IE?


2metre

unread,
Jun 29, 2005, 12:15:54 PM6/29/05
to
Try setting
display:block;
for your pink class. (Seems to cure most problems for me!)

McKirahan

unread,
Jun 29, 2005, 1:04:42 PM6/29/05
to
"2metre" <new...@hersham.net> wrote in message
news:11c5i9v...@corp.supernews.com...
> McKirahan wrote:

[snip]

> Try setting
> display:block;
> for your pink class. (Seems to cure most problems for me!)

Thank you!


Adrienne

unread,
Jun 30, 2005, 6:36:59 PM6/30/05
to
Gazing into my crystal ball I observed "McKirahan" <Ne...@McKirahan.com>
writing in news:Fd2dnaaNDZS...@comcast.com:

Additionally, please do not use font units that cannot be resized by the
user; ie px, pt, in, cm. Use percentages.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

0 new messages