SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: CSS margins

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool CSS margins

    Hi,

    I'm doing some work on a client's website (which was written by somebody else).

    Currently there is a small border between the top of the browser window and the content - http://www.int-rs.com/

    However since I've been tinkering it's gone - http://www.int-rs.com/dev/index.asp

    What's causing the margin in the original site, and how do I acheive the same result while maintaining the drop shadow effect?

    Thanks a lot!
    Toby

  2. #2
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have set margin: 0px and padding: 0px for the body, which is best.
    Put this in the selector div_sitewrap in irs.css

    Code CSS:
    .div_sitewrap {
        margin-top: 7px;
    }
    FOR SALE: 1 set of morals, never used, will sell cheap

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply hexburner.

    I've just added that, but nothing has changed :-(

    Is that because I've already got a margin declaration in there?

    EDIT:

    I've just changed the margin declaration to:-

    Code:
    margin: 7px auto 0px auto;
    It's working now!

    Thanks.
    Last edited by T0bster; May 30, 2007 at 02:40.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •