Grow your CSS skills. Land your dream job.

Trouble with margin in Safari

  • # October 5, 2009 at 12:03 pm

    Works fine in IE and Firefox, but a margin(a gap I don’t want there) shows up below main content(below columns) in safari. Gone over it a million times and can’t figure it out. Please help!

    http://www.skininstituteusa.com

    # October 7, 2009 at 8:08 am

    Hello,

    This is the example css code for only the safari browser.
    Please try this.

    SAFARI CODE

    Safari is the only browser that seems to understand the ":first-of-type" pseudo class

    Eg:

    div:first-of-type p
    {
    left:7px; /* this will be only used in SAFARI because of :first-of-type */
    }

    Note

    This :first-of-type can be only used for parent classes so in our above example we are using it in the <div> to call it for <p> , for example

    div:first-of-type
    {
    left:7px; /* it wont work because :first-of-type can only be used for parent classes )
    }

    Hope it will be very much useful and easy

    Thanks & Regards

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".