473,414 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Major layout discrepancies between IE and Firefox

The page at the below URL renders perfectly in IE6, but is failing horribly
in Firefox (0.7, 0.8). I can't figure out why and was hoping someone could
take a quick look at it. Most of the layout is done through the use of
floats.

HTML file: http://superdisco.net/css/index.html
CSS file: http://superdisco.net/css/sd.css

The gray and maroon backgrounds are to highlight the layout used.

Any ideas on how I can get the page to display correctly in Firefox?

Thanks,
Drew Martin

PS: I'm sorry if it is bad form to post example URLs in this newsgroup, I
read the FAQ and saw nothing about it.
Jul 20 '05 #1
7 3647
Drew Martin wrote:
The page at the below URL renders perfectly in IE6, but is failing horribly
in Firefox (0.7, 0.8).
That means that there is 90% change that there is bug in IE and you have
understood something wrong. As it breaks with Opera too, change is 99%
I can't figure out why
Most likely because you don't know CSS box modell.
width == content-width
Most of the layout is done through the use of
floats.
No browser supports floats perfectly, but I don't think this is related
to floats.
HTML file: http://superdisco.net/css/index.html
CSS file: http://superdisco.net/css/sd.css
IE is in quirks mode, I assume. Try removing xml prolog. If it works,
that was the case.

http://gutfeldt.ch/matthias/articles/doctypeswitch.html
http://www.hut.fi/u/hsivonen/doctype.html

Did you know btw that IE don't support XHTML, exept by accident?

BTW, why are you using XHTML1.1, as you can't even serve it right.

You have contradicting character encoding stuff, you should fix that too
(UTF-8 vs ISO-8859-1)
PS: I'm sorry if it is bad form to post example URLs in this newsgroup, I
read the FAQ and saw nothing about it.


Psoting the URL is good thing. But you should also say something else
than it works perfectly in IE and not on FF. After all, it seems that it
works perfectly on FF and breaks badly on IE, when using definition of
perfect that is more widely accepted.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
I'm looking for work | Etsin työtä
Jul 20 '05 #2
Drew Martin wrote:
The page at the below URL renders perfectly in IE6, but is failing horribly
in Firefox (0.7, 0.8). I can't figure out why and was hoping someone could
take a quick look at it. Most of the layout is done through the use of
floats.

HTML file: http://superdisco.net/css/index.html
CSS file: http://superdisco.net/css/sd.css

The gray and maroon backgrounds are to highlight the layout used.

Any ideas on how I can get the page to display correctly in Firefox?


1. IE does not know XHTML
2. Using the XML Declaration puts IE 6 into Quirks Mode.
3. Removing the XML Declaration puts IE 6 into Standards Mode.
4. A suggestion is to place notes into your stylesheets. It helps you to
debug.
5. I have made changes to make your styles work. I may have approached
it differently, depending on what you had in mind.
6. Look over the notes that I have placed in the modified stylesheet below.
7. IE calculates widths differently, therefore some differences.
8. Read up on the box model and floats in particular.
9. Try the following modified stylesheet:
10. WFM in IE and Moz.
11. Does not work in Opera. It seems that Opera does not support
display:inline-block.
12. Perhaps someone else will help further.

=====
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
background-color: #004477;
color: #FFFFFF;
font-size: 80%;
text-align: center;
line-height: 13pt;
}

#frame { /* Over-All Wrapper */
width: 750px;
text-align: left;
border: 2px solid #000;
margin-left: auto;
margin-right: auto;
padding: 0; /* changed 0px; to 0; */
}

#navcontainer { /* wrapper for Navs and Image 1 & 2 */
/* display: inline; removed, needs to be the default of block */
background-color: Gray;
float: left; /* removes the box out of normal flow */
width: 150px;
padding-left: 3px;
padding-right: 3px;
font-size: 12px;
font-weight: bold;
margin: 0; /* changed 0px; to 0; */
}

#maincontainer { /* wrapper for Banner, Tiles, Contents */
display: inline-block; /* changed from inline to inline-block */
background-color: Maroon;
/* float:right; !!!drops it down below navs */
/* width: 100%; ??? */
/* padding-left: 3px; removed left and right padding
padding-right: 3px; and used shorthand with adjustments */
padding:1px 3px 1px 3px;
font-size: 12px;
font-weight: bold;
margin: 0;
margin-left:156px; /* to clear navcontainer 3+150+3=156 */
}
#banner, #tiles, .content { /* Banner, Tiles and Contents */
/* display: block; not needed - is so by default */
padding: 3px;
background-color: #116699;
border: 1px solid #fff;
margin-top: 5px; /* changed from 6px; to 5px; to */
margin-bottom: 5px; /* compensate for the 1px border */
}

#navcontainer .navheader, #navcontainer a { /* Link Visited & Hover */
display: block; /* states */
padding: 3px;
background-color: #116699;
border: 1px solid #fff;
margin-top: 6px;
margin-bottom: 6px;
}

#navcontainer .navheader, #navcontainer a { /* this is not needed */
/* width: 100%; ??? */
}

#navcontainer a:link, #navcontainer a:visited {
color: #FFF;
text-decoration: none;
}

#navcontainer a:hover {
background-color: #4499CC;
color: #FFF;
}

#buttonstrip { /* for Image 1 and Image 2 */
text-align: center;
}

#banner { /* Home box */

font-weight: bold;
text-align: center;
/* width: 100%; ??? */
margin-right: 135px; /* added to clear the tiles */
}

#tiles { /* box for tile 1-5 */
/* margin-left: 6px; "broken?" NO, applied margin to banner */
float: right;
width: 127px; /* IE needs 1+25x5+1=127 */
font-weight: bold;
text-align: center;
/* padding-left: 0px; these 4 declaration removed
padding-right: 0px; and replaced with shorthand
padding-top: 0px; padding: 0;
padding-bottom: 0px; */
padding: 0;
margin-top: 4px; /* added margin to line up tiles */
height: 25px;
}

..content { /* are the two Contents boxes */
/* clear: both; THIS CLEARS AND PLACES IT UNDER NAVS */
/* display: block; not needed - is so by default */
/* width: 100%; ??? */
font-size: 100%;
margin-top: 6px;
}

..bullets { color: #CCCCCC; } /* are the .::.:. and :: */

#tile1 { /*tile 1-5 are the shaded small boxes*/
float: left;
background-color: #004475;
width: 25px;
height: 23px;
}

#tile2 {
float: left;
background-color: #5e96bf;
width: 25px;
height: 23px;
}

#tile3 {
float: left;
background-color: #98c3dc;
width: 25px;
height: 23px;
}

#tile4 {
float: left;
background-color: #cee1eb;
width: 25px;
height: 23px;
}

#tile5 {
float: left;
background-color: #ffffff;
width: 25px; /* typo?? changed 23px; to 25px; */
height: 23px;
}
=====
Jul 20 '05 #3
Gus Richter wrote:
11. Does not work in Opera. It seems that Opera does not support
display:inline-block.


If you get problem with inline block on Opera, why are you using it?
Opera has buggy support for inline-block, others don't even try to
support it.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
I'm looking for work | Etsin työtä
Jul 20 '05 #4
Lauri Raittila wrote:
Gus Richter wrote:

11. Does not work in Opera. It seems that Opera does not support
display:inline-block.

If you get problem with inline block on Opera, why are you using it?
Opera has buggy support for inline-block, others don't even try to
support it.


1. I don't know exactly what the OP has in mind for end result.
2. I tried to get the thing working for IE and FF just as the OP wanted
and with the existing code, since nobody else did.
3. I have no intention of rewriting/redesigning the piece for the OP.
4. It should get the OP started - what to read up on - block, inline,
inline-block, float, etc.
5. His requirement says nothing about Opera - I provided it as
additional info.
6. I'm waiting for YOU to rewrite the piece for the OP, without
inline-block.

--
Gus
Jul 20 '05 #5
Gus Richter wrote:
Lauri Raittila wrote:
Gus Richter wrote:
11. Does not work in Opera. It seems that Opera does not support
display:inline-block.
If you get problem with inline block on Opera, why are you using it?
So, I was mistaken who used it. As you posted changed the CSS, I assumed
it was you.
Opera has buggy support for inline-block, others don't even try to
support it.

5. His requirement says nothing about Opera - I provided it as
additional info.
And I added some additional information to your information, because that
was not really very informative.
6. I'm waiting for YOU to rewrite the piece for the OP, without
inline-block.


This seems to be only point in your post, and as you say you don't bother
doing it yourself, I think you have gotten some wrong idea about my post.
I have nothing against you, even if there was some communication problem
in the past between us.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
I'm looking for work | Etsin työtä
Jul 20 '05 #6
Lauri Raittila wrote:
Gus Richter wrote:
11. Does not work in Opera. It seems that Opera does not support
display:inline-block.

If you get problem with inline block on Opera, why are you using it?
So, I was mistaken who used it. As you posted changed the CSS, I assumed
it was you.


You were right the first time. I was the one that used
display:inline-block since it was the way to get HIS styles to work for
both IE and FF, without me doing a rewrite/redesign. He had used
display:inline which did not work.
Opera has buggy support for inline-block, others don't even try to
support it.
5. His requirement says nothing about Opera - I provided it as
additional info.


And I added some additional information to your information, because that
was not really very informative.


And I thank you for the additional information, since I am not up to
date on all Opera things.
6. I'm waiting for YOU to rewrite the piece for the OP, without
inline-block.


This seems to be only point in your post, and as you say you don't bother
doing it yourself, I think you have gotten some wrong idea about my post.
I have nothing against you, even if there was some communication problem
in the past between us.


I answered your question fully and I feel that I have spent more than
enough time on this, that's all. It was an invitation for you to make it
work for all three, as you suggested it should, without
display:inline-block. There are comments added to my modified stylesheet
which may help, if you decide to take on the invitation.
I realize that there probably is also a second language problem here. If
I have come across in any negative way toward you, please accept my
appology.

--
Gus
Jul 20 '05 #7
Gus Richter wrote:
Lauri Raittila wrote:
Gus Richter wrote:

I was the one that used
display:inline-block since it was the way to get HIS styles to work for
both IE and FF, without me doing a rewrite/redesign. He had used
display:inline which did not work.


I had another quick look and find that removing the display property
completely is all that is needed for all three browsers to display it
correctly. I thought that I tried that first and it hadn't worked,
probably because I still had float in there. Anyway, this change is all
that is needed:

#maincontainer { /* wrapper for Banner, Tiles, Contents */
/* display: inline-block; removed display property completely */
....

It seems that I will have to reread the specs again, since I have made
errors in the notes in the modified stylesheet, wherein I mention the
default to be block when in fact it is inline that is the default.
Fortunately or unfortunately, nobody seems interested in the modified
stylesheet since nobody pointed out this blunder.

--
Gus
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Xavier Onassis | last post by:
I would be grateful for recommendations for a CSS layout (header, 2 cols, footer) that can accomodate dynamically added elements. I am not having any luck so far getting this to work in...
3
by: Dave | last post by:
I am designing a web page using VS2003 ASP.NET. The page contains various DIVs (panels), one of which is in grid layout. The controls in this DIV render correctly in IE, but when using Firefox they...
11
by: Ben Holness | last post by:
Hi all, I am having some trouble with some table code. It works fine in Internet Explorer, but the layout doesn't work correctly in Firefox 1.0.7 Is this a firefox bug, or am I missing...
10
by: Luke | last post by:
Hi. I am trying to make correct layout, here is an example of (dynamically generated content via jsp): http://localhost/www/layout.htm Most outer div is positioned absolute (if not then it...
2
by: Edward | last post by:
I'm pursuing the holy grail of creating a two-column CSS layout with footer AND where the colors of the columns actually go all the way down. The code is below. Here is a graphic of how it...
1
by: gatorade | last post by:
Drop Down list in a form is breaking layout of the page in FireFox. Here is the page in question: http://www.redchip.com/visibility/RCinstitutional-Requestinfo.asp The layout is simply two...
1
by: Scott | last post by:
I've been trying to use css stylesheets to lay out a header, a left column and a main content area using width as percentages so the layout can expand and contract with the browser. I'm using...
2
by: Max58kl | last post by:
Hi I have a form with - 13 text input fields 1 text area 2 radio buttons 4 buttons 1 check box 1 submit button
2
by: Liam Gibbs | last post by:
Hello everyone, This will be my third time posting this, but for some reason, my message isn't get through to the newsgroup, even after hours of waiting. So here goes again. I'm having huge...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.