/    Sign up×
Community /Pin to ProfileBookmark

Positioning differences between IE and firefox

Hi, I am developing a photo sharing website and am having some positioning problems in firefox. All CSS elements position perfectly in IE. But in firefox there is a big gap between the header and the nav bar. I then have a content box that expands with the content that is place in it. This is done by vertically tiling the center of the graphic box. On IE the box expands fine. In Firefox the box doesn’t.

Here’s the CSS for the header and nav bar:

#header {
background-image: url(../images/header2.jpg);
text-align: center;
margin-left: auto;
margin-right: auto;
height: 175px;
width: 770px
}

#menu {
border: none;
background-image: url(../images/navbar.jpg);
text-align: center;
margin-left: auto;
margin-right: auto;
height: 57px;
width: auto;
}

Here’s the CSS for the 2 column content with the expanding box on the left column:

.page {
width: auto;
border-left: 550px solid #FFF;
border-right: 0px solid #993399;
border-top: 3px solid #FFF;
}

.section {
margin: 0;
width: 100%;
}

.col-A, .col-B, .col-C {
position: relative;
float: left;
}

.col-A {
margin-left: -550px;
margin-right: 1px;
width: 550px;
z-index: 2;
}

.col-B {
margin: 0 -3px 0 -2px;
width: auto;
}

.col-C {
color: white;
margin-left: 0px;
width: 0px;
}

/*stop coloumn overlapping*/
.clear {
clear: both;
}

.page > .section {
border-bottom: 1px solid transparent;
}

/*graphical backgrouds for column A – for map and photos*/
.col-A-topcap {
background-image: url(../images/col_top.jpg);
width: 550px;
height: 115px;
z-index: 1;
}

.col-A-center {
background-image: url(../images/col_middle.jpg);
text-align: center;
width: 550px;
height: 100px;
z-index: 1;
}

.col-A-bottom {
background-image: url(../images/col_bottom.jpg);
float: left;
width: 550px;
height: 143px;
z-index: 1;
}

Any ideas are welcome, thanks. Ajay

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@toicontienNov 10.2005 — We'll have to see the HTML too. Internet Explorer and Firefox can be extremely different and frustrating beasts. Once you design for Firefox, which comes closest of all the browsers to supporting standards, you'll find that Internet Explorer is a frustrating beast.

When working in quirks mode, IE-Win gets the [url=http://www.w3.org/TR/CSS21/box.html#box-dimensions]box model[/url] wrong. Firefox, Camino, Netscape 7+, mozilla, Safari, and Opera get it right.

IE and all the others treat floats differently too. You might want to take a trip to [url=http://www.positioniseverything.net/]Position Is Everything.net[/url]. It has an entire section highlighting many of IE-Win's common CSS rendering problems.
Copy linkTweet thisAlerts:
@drhowarddrfineNov 10.2005 — Never, ever design for IE. It is old, buggy and non-standards compliant. Always design in Firefox so it will work in all browsers. Then adjust for IEs quirks and bugs.
×

Success!

Help @bagatrix spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...