Jump to content

General css advice, dealing with hacks, and other things.


Ninjakreborn

Recommended Posts

when you create simple semantic markup.

If you use the strict doctype it forces ie render in a compliant manner  (or so far as I have experienced). Even then I have done a number of transtional sites and set out to negate the need for css hacks.

If you want to rid your self of the css hacks but waht you want to do is 'impossible' just by forming good semantic html you can use the html hack!

this involves you placing a div around every element on your page that has padding and border with another div that has no margin padding or border - just a container.

It is extra html but if you can live with it I don't care. ;)
Link to comment
Share on other sites

[quote]If you use the strict doctype it forces ie render in a compliant manner  (or so far as I have experienced).[/quote]

Only in IE 6.0/7.0 and ONLY specifically for the "box-model" hack alone. And more <div>s are not the answer. That's commonly known as "divitus" to the css guru community.

It is so much more, in so many ways. IE 6.0 has quite a few buggy ways (other than the box model) of mangling proper standards compliant css. Most of the issues are with floats, and flexible layouts (fixed layouts and fonts - using set px sizing -  fare slightly better in IE).

Here is a great site that explains ALL of them from the author of the "holly hack" . These CSS bugs are all found only in Internet Explorer, versions 5 and higher (and they have a section on IE 6.0 bugs, as well):

[url=http://www.positioniseverything.net/explorer.html]http://www.positioniseverything.net/explorer.html[/url]

But! The best way to check if you need a hack or not is to view your site on the various IE broswer versions. At my office we have a Mac with IE 5.23 for Mac. One PC with 5.1x and one with 5.5.

And of course our workstations/laptops all have 6.0. You only need to worry about IE. Nearly all of the other modern browsers are standards compliant. Chances of a user with an old Opera or Netscape are slim since most of the people who use them know what they are doing and actually use the most current version - if not they fall back on their computers IE. And Mac's Safari, even the older versions, handle standards just fine.

Incidentally, I would be happy to check anybody's finished VALIDATED standards compliant websites (that also first work as expected in IE 6.0!) and render a screenshot for you. Just send me an IM request.

Dave

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.