Grow your CSS skills. Land your dream job.

Need Help with Margin Issue in Safari

  • # August 19, 2009 at 2:02 pm

    Hi all! First time posting and newbie to web design. I cannot for the life of me figure out why there is a gap after my main content area in Safari only. Works perfectly in IE and Firefox. I tried making a negative margin and that works for Safari but then its negative and overlapping in IE and Firefox.

    here’s the link- hope someone can help

    thanks

    http://www.skininstituteusa.com

    # August 19, 2009 at 2:18 pm

    no time to look at this right this second.. bout to head out… but I did notice that you don’t use any kind of CSS shorthand. You really should to save yourself some typing for one… and it’ll make your stylesheets much much smaller.

    for instance.. rathar than..

    Code:
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: 100px;

    save yourself some time and keystrokes and just use shorthand like so…

    Code:
    margin: 0 0 0 100px;

    It works in the same order as I first wrote above. Top Right Bottom Left

    Works the same with your padding.

    Can save some keystrokes on your background definitions too. Rather than..

    Code:
    background-image: url(http://cdn.css-tricks.com/images/example.jpg);
    background-repeat: no-repat;

    Save some keystrokes and use shorthand…

    Code:
    background: url(http://cdn.css-tricks.com/images/example.jpg) no-repeat;

    Just a couple easy ways to clean up your stylesheets and save yourself some time and keystrokes.

    # August 19, 2009 at 2:47 pm

    thanks for the tips!

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

You must be logged in to reply to this topic.

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