Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting for IE8 using CSS help 1

Status
Not open for further replies.
Sep 11, 2002
49
0
0
GB
Hi all,

Quite new to css and design, but struggling through a book on it.

I am trying to mimic a table layout for a page using Divs and CSS. It looks fine in IE7, but messed up in IE8 (unless you select compat-view). Can anyone let me know where i'm going wrong?


All help gratefully appreciated!

Patrick
 
What exactly do you mean by table layout?

I'm looking at this on FF3 and Ie8, and it looks the same in both.

So perhaps a description of what you are aiming for would be useful.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
IE7 (and you) are incorrectly interpreting where the width of an unfloated element occurs.

IE7 believes that the width should happen next to the floated element. So a floated 100px wide element and a 600px wide unfloated element make up together 700px. This is, however, incorrect. IE8 and FF3 correctly interpret that unfloated element exists under the floated one, making their width together 600px. You can test this in many ways, easiest would be to not put a background color on the floated div and see that the background of the unfloated div (rather than the #everything div) shines through.

Changing the widths, now that you understand how they work, will fix your problem.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Ah - nicely put now I think I understand.

What a shame IE8 when previewing an HTML document which resides in the local file structure seems to automatically show it in compatibility mode. It means to see what a page will end up looking like I need to publish it to a web server!

 
I have given up - it's too annoying trying to get the Div's to work properly in IE8 and IE7 at the same time. I can do either but not both (at leat not without some IF statements and I can't be bothered). Stupid browsers.

Anyway back to tables with CSS for formatting!


Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top