CSS formatting across different browsers
I have now revamped my website debbiechalloner.com using the CSS and PHP. It displays fine in IE and Opera, but not quite in Firefox or Netscape. The main contents div seems to be displayed behind the left hand navigation, which is set to float: left. But I float is needed otherwise the main contents appears below the nav colomn.
Could anyone shed light on this - as I very new to CSS.
Debs
Rincewind posted this at 02:46 — 23rd October 2005.
They have: 11 posts
Joined: Jan 2004
Quite curious bug in FF. However, I did find a solution. If you tell your #maincontent to also float:left they you will see the overlap dissapear. You could do with validating your code though, and move off the transitional doctype to a strict one. Then have a look at removing those and tags that you have all over the place.
Q-4.net - Reseller web hosting programs
Stylegallery.co.uk - Scottish Landscape Photography Gallery
Splodgy.com - Web design tutorials
magicalsecret.com - How to do magic tricks.
debchall posted this at 18:37 — 23rd October 2005.
She has: 6 posts
Joined: Jul 2005
The float left for the main content has worked for every browser. There is still a wierd problem with Netscape Commuicator 4.8 - everything is all over the shot.
Cheers
Debs
Roo posted this at 19:16 — 23rd October 2005.
She has: 840 posts
Joined: Apr 1999
Forget about Netscape 4X. It's an ancient browser that doesn't support standards, including CSS.
If you want to test in Netscape, test in versions 7 and 8.
Roo
Rincewind posted this at 21:27 — 23rd October 2005.
They have: 11 posts
Joined: Jan 2004
You'll have to do allot of hacks to get the page to work in Netscape Commuicator 4.8. Basically it just doesn't support much of the CSS that you are using. The best solution if you must have a usable page for NN4.x is to get the style sheat to turn off. Just print the plain html without any layout or styles. Or just minimal styles. That way people on NN4.x can still see and read and use the page even if the site doesn't look the way it was intended.
One easy way to do this is to use the @import command to load in your style sheat. (NN4 can't understand the @import command so won't load the style sheet. All the ther browsers will load it though.) You can have a seccond style sheet using the usual link method and put just the basic colours and backgrounds in the second sheet and the complex layout CSS in the @import'ed sheat.
<style type="text/css">@import "css/not/for/netscape/4.x/and_older/browser.css";</style>
<link rel="stylesheet" type="text/css" href="the/simple/css/for/all/browsers.css" />
Though as Roo says - who uses Netscape 4.x browsers these days.
Q-4.net - Reseller web hosting programs
Stylegallery.co.uk - Scottish Landscape Photography Gallery
Splodgy.com - Web design tutorials
magicalsecret.com - How to do magic tricks.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.