SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    new york
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Css content background not showing up

    Hello,

    I have a content background that is not centering and not showing up.
    How do I fix that?

    Here is the url of the css:

    http://members.cox.net/19kash88/sd/css/sd.css

    Here is the html url:

    http://members.cox.net/19kash88/sd/index.html

    Thanks and please help me on this!

  2. #2
    SitePoint Enthusiast mherring's Avatar
    Join Date
    Feb 2004
    Location
    Cedar Rapids, IA
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any specific reason you're floating #mainnav to the right? I can't tell you exactly why, but removing the float declaration from #mainnav or putting one on #container should show your content background.

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    new york
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    I finally fix the stuff. I want to make sure if that is fix. So can you please look at the html and the css page. I want the site centered and top margin/bottom margin 0.

    Also, how can I center the navigation links up on top?

    Here is the url of the css:

    http://members.cox.net/19kash88/sd/css/sd.css

    Here is the html url:

    http://members.cox.net/19kash88/sd/index.html

    THanks

  4. #4
    SitePoint Enthusiast mherring's Avatar
    Join Date
    Feb 2004
    Location
    Cedar Rapids, IA
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can probably center the nav links by using:
    Code:
    #mainnav { text-align: center; }
    As for centering the main container with no top/bottom margins, I've used the following technique, which works well for fixed-width layouts:
    Code:
    body {
    background: #358 url(http://www.robertherring.com/img/rhp_bkgd.jpg) repeat-y center top;
    margin: 0;
    padding: 0;
    }
    #container {
    position: absolute;
    left: 50%;
    width: 576px;
    margin-left: -288px; /* Half the width */
    padding: 0;
    }
    That's at http://www.robertherring.com/
    You may need to use a transparent png image to have a dropshadow over a patterned background, though.


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
  •