Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

CSS Hacks

  • 06-03-2006 11:28PM
    #1
    Closed Accounts Posts: 4,655 ✭✭✭


    So people where do you find your hacks?

    I have trawled through loads of css files and I have seen loads of hacks - and yet I can never find an explanation for any of them

    For example, so of the strange markups I have see are:

    |margin
    mar\gin
    !important

    And so on.
    So does anyone know where I can read up on the above or in fact a good central repository for such hacks, etc


Comments

  • Registered Users, Registered Users 2 Posts: 7,782 ✭✭✭jmcc


    Ph3n0m wrote:
    So people where do you find your hacks?

    I have trawled through loads of css files and I have seen loads of hacks - and yet I can never find an explanation for any of them
    The CSS Anthology - 101 Essential Tips, Tricks & Hacks. (A fairly good book with explanations.) Also the Wrox book:
    CSS - Cascading Style Sheets for Web Design.

    Regards...jmcc

    Regards…jmcc



  • Registered Users, Registered Users 2 Posts: 2,203 ✭✭✭Serbian


    I think the main one is PositionIsEverything. If you see odd mark-up in a CSS file, often searching Google with the exact hack will throw up what the hack is. I found an explanation of what the mar\gin hack is.

    Just as a FYI, !important is not a hack in itself, it applies the rule that is associated with !important regardless of whether the style has been changed later on in the CSS document or not.

    Take the example below. Not knowing what !important did, you would expect the border on the box to be red, but it is in fact black.
    <html>
    <head>
    <title>Test</title>
    <style type="text/css">
    <!--
    .box {
    	border: 1px solid #000 !important;
    	border: 1px solid #c00;
    }
    -->
    </style>
    </head>
    
    <body>
    <div class="box">&nbsp;</div>
    </body>
    </html>
    


Advertisement