Combining CSS Hacks...

liunx

Guest
How would I go about combining the "!important" hack with the Tantek Box Model Hack? Or do they not even belong together?

Thanx.Why bother with hacks? nest elements and then put the padding on one, and the width on the outside one etc. That way you won't need the box model hacks.I didn't know there was an !important hack. I read it as a legitimate rule (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/cascade.html#important-rules">http://www.w3.org/TR/REC-CSS2/cascade.h ... tant-rules</a><!-- m -->).

As for the Tantek hack, maxdesign (<!-- m --><a class="postlink" href="http://www.maxdesign.com.au/presentation/liquid/#working">http://www.maxdesign.com.au/presentatio ... d/#working</a><!-- m -->) has a discussion on how to avoid it by applying padding to the items in the container rather than the container itself.

Hope that helps. Those solutions helped me!lindamulder: It is a legitimate rule but it can be used to give different values to IE and mozilla.

Stmasi: what we're talking about is what I did with your menu ages ago for you - an extra span inside the <a> tags. By applying widths to the container element nested elements can be made to take the width of the container element, (e.g. display: block;) and then padded as necessary.
 
Back
Top