css question
I know this is probably the most trivial thing of all, but are most of you using xhtml fully valid css, or do you tend to hack it? I have hacked quite a bit (okay, cut and pasted from other sites) of css, and written very little (fully valid css). What are other newsy startuppers doing?
7 comments
My goal is generally "Works in Firefox, IE, and Safari", but last time I checked it validated fine. In general, I tend to think "it works" is more important than "it's right", but if I can make it right too without totally convoluting or breaking things, I might as well.
I never cut & paste from other sites. I like to understand what I'm doing - it's the best way to ensure that it stays working.
One thing that surprised me - after I got things working in Firefox, it was only about a half day's worth of effort to get them working in IE as well. I was expecting it to be much worse, given all the griping about cross-browser compatibility. So perhaps knowing what you're doing does have some benefits...
I never cut & paste from other sites. I like to understand what I'm doing - it's the best way to ensure that it stays working.
One thing that surprised me - after I got things working in Firefox, it was only about a half day's worth of effort to get them working in IE as well. I was expecting it to be much worse, given all the griping about cross-browser compatibility. So perhaps knowing what you're doing does have some benefits...
Hack it how?
There is no reason to use hacks if you use conditional comments to deal with Microsoft's abominations one browser at a time. Most of the other browsers will work just fine, and when they don't, I either live with it, or alter the design so they do.
There is no reason to use hacks if you use conditional comments to deal with Microsoft's abominations one browser at a time. Most of the other browsers will work just fine, and when they don't, I either live with it, or alter the design so they do.
ok...here are some of my more traditional 'hacks'
negative margins ( margin-top:-5px; ) stylesheet switchers <?php if(xbrowser) { include'stylesheet1.php';} ?>
and so on
negative margins ( margin-top:-5px; ) stylesheet switchers <?php if(xbrowser) { include'stylesheet1.php';} ?>
and so on
I mix and match.
At work I'm valid.(I do this on purpose cause it takes a little bit longer)
For my stuff, I hack.(I do this cause it will still render correctly, as long as I check it on multiple OS and Browsers!)
At work I'm valid.(I do this on purpose cause it takes a little bit longer)
For my stuff, I hack.(I do this cause it will still render correctly, as long as I check it on multiple OS and Browsers!)
hell yeah!