Firefox vs. Safari vs. IE CSS Battle

Thread Solved

Join Date: Jul 2005
Posts: 23
Reputation: opsryushi is an unknown quantity at this point 
Solved Threads: 1
opsryushi opsryushi is offline Offline
Newbie Poster

Firefox vs. Safari vs. IE CSS Battle

 
0
  #1
Jan 29th, 2008
Ahoy all,
This is similar to sagedavis's "Firefox hates my CSS..." post, with a slightly different issue.

I've been a Windows user (not necessarily by choice, lol) all my life. We recently redesigned our school website (at gaylordhighschool.org). Like the classic purist web designer, I wrote all the code (XHTML 1.0 Strict) myself, in addition to the CSS. Formerly a pretty good table-based web designer, I saw the need to get away from using tables as a web design tool, so I made the whole layout using CSS positioning. It looks great in IE7 (probably because that's where I did the majority of my testing), but... I've recently switched to a Mac computer, so I'm using Safari 3 now.

The layout looks basically the same - but there are a few issues. The navigation bar in the middle overlaps the logo/picture on the left. Both the navigation bar and the date/status section (at the top right) are a little taller than the logo/pic section. they should line up perfectly (they do in IE7). In addition - in the content section, the text seems to escape the div tags somehow.

I get most of the same problems in Mozilla Firefox. Again, everything seems to look great in IE7.

There's a part of me that says leave it - after all, Internet Explorer won the "browser wars" of the 90's, and has proved itself as the world's most popular web browser year after year since. However, as a Mac user myself, now... it's rather annoying to have to deal with the problem every time I visit our website. So I'd like to fix it.

What am I doing wrong here, and how might I go about fixing it?

Thanks,

Kyle Wilson
Project Leader
Gaylord High School Website
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 178
Reputation: sbv is an unknown quantity at this point 
Solved Threads: 8
sbv's Avatar
sbv sbv is offline Offline
Junior Poster

Re: Firefox vs. Safari vs. IE CSS Battle

 
0
  #2
Jan 30th, 2008
hi opsryushi
Yes its a universal problem. I also faced the same.
I tell you what i did is...
I created a css compatible to IE and another one compatible to Safari and Mozhilla.
and in each page i checked the user browser and linked appropriate css.
This may not be the proper solution for this type of problem. But i need to solve that within time. Because i developed and tested my project in IE as you. But my User using Safari. So i did this ....
Is anybody having different solution for this?
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,429
Reputation: Nichito is an unknown quantity at this point 
Solved Threads: 30
Featured Poster
Nichito's Avatar
Nichito Nichito is offline Offline
Nearly a Posting Virtuoso

Re: Firefox vs. Safari vs. IE CSS Battle

 
0
  #3
Jan 30th, 2008
actually, i'm going through the same issue...

sbv's solution is pretty attractive... though, you must write compatible html codes with every css, so they're compatible to each one of them...

besides, what if i'm using for example, Safari 2, and there's no css code for my browser? or if i'm using an uncommon browser like Opera?
-->sometimes i wanna take my toaster in a bath<--
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 178
Reputation: sbv is an unknown quantity at this point 
Solved Threads: 8
sbv's Avatar
sbv sbv is offline Offline
Junior Poster

Re: Firefox vs. Safari vs. IE CSS Battle

 
0
  #4
Jan 30th, 2008
Hi Nichito
you can get that all information like version,OS, browser.. and so on.. using
HTML and CSS Syntax (Toggle Plain Text)
  1. HTTP_USER_AGENT
And then check for compatibility releted to each browser and create css
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,429
Reputation: Nichito is an unknown quantity at this point 
Solved Threads: 30
Featured Poster
Nichito's Avatar
Nichito Nichito is offline Offline
Nearly a Posting Virtuoso

Re: Firefox vs. Safari vs. IE CSS Battle

 
0
  #5
Jan 30th, 2008
Originally Posted by opsryushi View Post
after all, Internet Explorer won the "browser wars" of the 90's, and has proved itself as the world's most popular web browser year after year since.
i wouldn't give that for granted, since mozilla is on the rise and it has more users day after day...
-->sometimes i wanna take my toaster in a bath<--
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: Firefox vs. Safari vs. IE CSS Battle

 
0
  #6
Jan 31st, 2008
Yuk.. it's a real hack to serve diff pages to diff browsers, especially when using HTTP headers to determine the browser. How many browsers are you gonna target? What happens when the browser version changes? What happens if the browser identifies itself as a different browser? ( that's not farfetched )

Just go for a minimalist design that doesnt put too high a requirement on browser nuances, avoid floats and abs/rel positioning where possible, and you're laughing all the way to the server. Take a look at some 'popular' commercial or organization sites, most are very simple structurally; just neat, tidy and consistent looking. That's probably not what you want to hear, halfway through a project, but, certainly consider it in future.

Also, don't avoid using tables to prove a point - they tend to be identical across browsers - perhaps because they're so 'outdated' they've become well standardized.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,429
Reputation: Nichito is an unknown quantity at this point 
Solved Threads: 30
Featured Poster
Nichito's Avatar
Nichito Nichito is offline Offline
Nearly a Posting Virtuoso

Re: Firefox vs. Safari vs. IE CSS Battle

 
0
  #7
Feb 1st, 2008
i like your opinion about tables... actually i rather code my pages based in tables than messing around with positioning
-->sometimes i wanna take my toaster in a bath<--
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Firefox vs. Safari vs. IE CSS Battle

 
0
  #8
Feb 8th, 2008
IE won the browser war solely because it cheats. It comes with Windows.

There is a trick to making stuff fit in a browser-independent way:

Don't put block-object size definitions in the same tag or style that contains surrounding styles (margin, border, padding).

Nest them instead, so you can control which is inside.

FF puts the surrounding styles outside a block-object's defined size. IE crams them inside.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 23
Reputation: opsryushi is an unknown quantity at this point 
Solved Threads: 1
opsryushi opsryushi is offline Offline
Newbie Poster

Re: Firefox vs. Safari vs. IE CSS Battle

 
0
  #9
Feb 9th, 2008
Originally Posted by MidiMagic View Post
IE won the browser war solely because it cheats. It comes with Windows.
I like that! Lol. Thanks for the comments, everyone. It looks like I don't have too much of an easy way out of this, so for the stint of this design, we'll just have to sort of live with it. At least until we get a lot of free time on our hands, hehe.

Thanks,

Kyle Wilson
Project Leader
www.gaylordhighschool.org
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



Tag cloud for HTML and CSS
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC