CSS: Accomodating All Browsers ?

  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Posts: 659
  • Loc: USA

Post 3+ Months Ago

I was curious what people think about CSS and how it works on the various browsers. I am webmaster for about 4 sites and the CSS works fine in IE, in FireFox it is a little buggy but I need to make a new CSS file and use some java to dynamically pick which CSS file to use.

My issue comes up as my code is not compatible with Netscape ... apparently it has issues with borders and some other things.

About 85% of our user base is on IE, and about 10 to 13% is on FireFox.

I am pondering if I should put a CSS file for Netscape on my list of things to do, or let it go as it is a slim minority of our user base. As it stands I am leaning towards making a CSS file for it last on the list.

Comments / Questions / Responses?

Thanks!

Ken
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Zwirko
  • Guru
  • Guru
  • User avatar
  • Posts: 1417
  • Loc: 55° N, 3° W

Post 3+ Months Ago

Unless you are doing something highly unusual then there is no need to have different css files for each browser - especially if it's just "borders and some other things".

But in all honesty, if you find yourself needing to do this then it is more than likely that it is an issue with your html markup or some bad css that is causing the problem.

Clean, valid markup has surprisngly few cross-browser issues - and those that do exist are often easily fixed without recourse to browser sniffing and serving up alternate style sheets.
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Posts: 659
  • Loc: USA

Post 3+ Months Ago

Netscape is having issues with borders and stying ...

Firefox I need to adjust my the postioning of my DIV tags as they are appearing too high in FireFox, but correctly in IE. So it is clean code (to my knowledge) it is off due to differences in browser displays.
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6809
  • Loc: Martinsburg, WV

Post 3+ Months Ago

Who still uses Netscape?
  • Zwirko
  • Guru
  • Guru
  • User avatar
  • Posts: 1417
  • Loc: 55° N, 3° W

Post 3+ Months Ago

There could be a bunch of things causing that - it's hard to tell what without seeing the page in question.

One thing that often catches people out is the different default paddings and margins browsers have. For example you may need to declare what margins and paddings are on the <body> tag otherwise IE, FF and whatever will just use their default values. That's one of the more common problems.

Try setting them to zero (or whatever you desire - as long as it's something):

Code: [ Select ]
body {margin: 0px; padding: 0px}


It's those sorts of things that make the difference. The problem also arises on lists and heading tags too. Failing that, it could also be a bunch of other things - like box model problems. I'm sure you don't need multiple style sheets - but as I said at the top, it's hard to tell without seeing more.
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Posts: 659
  • Loc: USA

Post 3+ Months Ago

That was my thought at first "who still uses netscape?" but apparently some people still do.


This is one of the pages, http://swanzeyselfstorage.com/

I think it does need to do with the default margins and paddings as you said Zwirko. I am planning on fixing this page up with color scheme, moving the java script to a separate file, and fixing the CSS ... but even with it's imperfections, it is 100% better than the 1 page throw together that I replaced and required massive amounts of scrolling. I have this listed in the design section if you want to add any additional comments.

Any help is appreciated as I am teaching myself CSS and it is coming along well, but there is always more to learn.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

I found this some time ago and it helped me a lot with understanding the ways that different browsers interpret padding and margins differently ... I think it would be of help to you too ... http://www.ozzu.com/website-design-forum/width-width-width-right-t21298.html
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Posts: 659
  • Loc: USA

Post 3+ Months Ago

The body margin and padding seems to be what I was missing.

I am going to make those changes ASAP.

The other information was helpful and will read into it more before I do a final redesign be I believe I was just missing the margin and padding.

Life would be easier with one set of rules for all browsers ...

Thank you for the help.
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

kbergmann wrote:
Life would be easier with one set of rules for all browsers ...


Bah! That would make all browsers the same browser and that would be boring. :lol:
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Posts: 659
  • Loc: USA

Post 3+ Months Ago

True, the added challenges are good and keep you on your toes ...

I must say I do enjoy learning CSS more indepth and the finer points of it as far as deviating from tables ... It is so much cleaner and nice to look at the code :)

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 65 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.