good css skillz
- Started
- Last post
- 15 Responses
- imnotaplumber
How do you write css and not need a separate IE 6 stylesheet? like, I don't know: http://www.area17.com/
Do you always write an IE 6 stylesheet?
- Jordy0
or just leave it out and don't support this dinosaur browser?
- lukus_W0
if you forget about IE6 and you make websites for regular people, you're a bad web designer / web developer.
- Stugoo0
I tend to build using CSS 1 because of ie6, doesn't mean I don't neglect things like ::selected
You really have to be careful how you build your pages... try to use paddings instead of margins. keep everything clean, measure your widths correctly, use display:inline when floating items with margins....
i stumbled a nice link yesterday actually... let me try dig it out.
- Stugoo0
- "Well we all know IE6 is poo, that’s just a given." love that intro:)alicetheblue
- Stugoo0
i tend to build for all browsers then tidy up in ie6, ive develoepd a dev style which means that I dont have too worry too much about ie6 bugs.
but to be honest its just experience thats made me build this way... that and lots of time pulling my hair out.
- lukus_W0
I find that using a resets script is amazingly helpful -> kind of 'levels the ground' (smoothing out inconsistencies between browsers).
YUI produce one, but there are loads out there. I'd recommend you find one and use it - it's made IE6 far less of a hassle for me.
If I do need to hack-up my code to make it work in IE6, I add this to a separate sheet and use conditional comments to route it to only this browser.
- uan0
I try to use css that works on every browser to build sites, most of the time I have to give divs or other blockelements exact width attributes for ie6 to display it right...some layouts work out just fine, sometimes It's a matter of minutes to fix ie6 layouts, and sometimes I'm forced to make a special ie6 css to make it work...
(but it's really mostly about fixed widths in block elements in my experience)
- Nightshade0
Like Lukus_W I always start my stylesheets with CSS Reset Reloaded, it greatly improves consistency:
http://meyerweb.com/eric/thought…Then I use conditional comments in my HTML <head> tag for a separate IE6 stylesheet:
<!--[if IE 6]>
<link href="styleIE6.css" rel="stylesheet" type="text/css" />
<![endif]-->
- harmsie0
I found this bit of advice very useful when it comes to IE6
http://dowebsitesneedtolookexact…
- trooperbill0
dont use margin and padding at the same time along the x axis.
and make sure you clear floats properly
on and no left margins on new line started divs
- ernexbcn0
resets is the trick, and depending on what you're doing you won't need conditional stylesheets
- welded0
Along with a good reset framework and just plain ol' experience you can learn to minimize IE6 trouble. One thing I've standardized around is that main container divs (think header, footer, content...) have another div just inside (think header-inner, etc.). I use the outer for positioning and the inner for adjusting paddings and the link. It works really well and neatly avoids some annoying browser quirks.
- Stugoo0
One thing to do is get a nice basic site layout and use it as a base template for starting new projects. Continually adding to mine.
next to add are mobile styles...
- imnotaplumber0
yeah, i feel it is stupid though that we have to write css in a particular way/method so that IE6 renders it nicely, when you can write solid CSS for basically every other browser without thinking too much about bugs and it works but then you open in IE6 and because of the broken box model and double margins it looks retarded.
- remember that box-model in IE can be switched according to the doc-type you uselukus_W
- http://www.quirksmod…lukus_W