Forum Moderators: not2easy

Message Too Old, No Replies

css padding differences between IE v. Firefox

         

cjjeeper

12:42 am on Sep 16, 2007 (gmt 0)

10+ Year Member



Here is the CSS for my content:
#content
{
margin: auto;
width: 730;
height: auto;
background-color: #999966;
float: left;
clear: none;
padding:5 175 25 50;
}

This works with the padding to fill up the blank space on the right side out to 955 pixels which is the width I want. Firefox sees this fine.

This does not work with IE 6.x. It does not line up with my header and does not fill up the blank space on the right.

What I would like to do (I think) is to center the content regardless of the length of the content (in both browsers of course.)

Old_Honky

12:57 am on Sep 16, 2007 (gmt 0)

10+ Year Member Top Contributors Of The Month



You haven't specified units correctly on the width or padding.
e.g.
730 what? %? px? cms?

cjjeeper

1:12 am on Sep 16, 2007 (gmt 0)

10+ Year Member



converting to:
#content
{
margin: auto;
width: 730px;
height: auto;
background-color: #999966;
float: left;
clear: none;
padding:5px 175px 25px 50px;

}
yeilds no change.

encyclo

1:30 am on Sep 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld cjjeeper! Sounds possibly like a quirks-mode vs. standards-compliance mode issue. What doctype are you using? If it is an XHTML doctype and you have an XML prolog, remove the prolog and see if there is a difference.

[edited by: encyclo at 1:53 am (utc) on Sep. 16, 2007]

cjjeeper

1:40 am on Sep 16, 2007 (gmt 0)

10+ Year Member



Thanks for the Welcome.

I removed:

<html xmlns="http://www.w3.org/1999/xhtml">

to no avail.

encyclo

1:47 am on Sep 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The XML prolog would be something like this:

<?xml version="1.0" encoding="UTF-8" ?>

Also, have you checked with the CSS validator [jigsaw.w3.org]?

cjjeeper

3:25 am on Sep 16, 2007 (gmt 0)

10+ Year Member



the only line I have is the one I removed.

IE does not appear to read padding like FireFox. I change values and get different movement for the same number of pixels.