Results 1 to 9 of 9

Thread: css layering wrong

  1. #1
    Join Date
    May 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default css layering wrong

    Hi there

    I'm having a very hard time with a layout I'm working on. I know my code must be wrong but it all validates (both css & html) and IE shows it correctly (not that that says anything). If anyone can help I'd be VERY grateful!

    Short Version:
    class balls is showing behind the class right.
    class left is ending aboveclass left1 not going on behind it
    there is a space between class left 1 and class left2

    the css:
    Code:
    /* SW CSS Document */
    
    body {
    margin: 0px; 
    padding: 0px;
    background-color: #000000;
    background-image: url(images/bg.jpg);
    background-repeat: repeat-x;
    text-align: center; 
    font-family:  Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #000000;
    
    scrollbar-base-color: #ffffff;
    scrollbar-arrow-color: #E31836;
    
    scrollbar-shadow-color: #CDCCD7;
    scrollbar-lightshadow-color: #DDDDE5; 
    scrollbar-darkshadow-color: #4B4C4E;
    
    scrollbar-highlight-color: #ffffff;
    scrollbar-3dlight-color: #E5E5ED;
    
    }
    
    .container{
    width: 745px;
    background-color: #ffffff;
    }
    
    
    .top{
    background-image: url(images/top.jpg);
    background-repeat: no-repeat;
    height: 158px;
    width: 745px;
    }
    
    .right{
    background-image: url(images/r1.jpg);
    background-repeat: repeat-y;
    background-position: right;
    width: 745px;
    z-index: 1;
    }
    .left{
    background-image: url(images/l1.jpg);
    background-repeat: repeat-y;
    background-position: left;
    width: 745px;
    text-align: left;
    }
    
    .left1{
    background-image: url(images/2h.jpg);
    background-repeat: no-repeat;
    background-position: top;
    float: left;
    width: 317px;
    
    }
    .left2{
    background-image: url(images/h1.jpg);
    background-repeat: no-repeat;
    background-position: 149px 112px;
    width: 317px;
    }
    
    .content{
    float: right;
    background-image: url(images/3.jpg);
    background-repeat: no-repeat;
    background-position: top;
    width: 428px;
    text-align: left;
    margin-top: 0px;
    }
    
    .content2{
    margin-top: 45px;
    margin-right: 45px;
    margin-left: 15px;
    margin-bottom: 20px;
    }
    
    
    .navb{
    color: #4B4C4E;
    font-weight: normal;
    font-size: 12px;
    line-height: 200%;
    margin-left: 15px;
    }
    
    .navt{
    color: #4B4C4E;
    font-weight: bold;
    font-size: 12px;
    border: 1px #000000;
    width: 180px;
    margin-top: 20px;
    margin-left: 20px;
    height: 300px;
    }
    
    a.nav:link {color: #4B4C4E; text-decoration: none;}
    a.nav:visited {color: #4B4C4E; text-decoration: none;}
    a.nav:hover {color: #E31836; text-decoration: none;}
    a.nav:active {color: #E31836; text-decoration: none;}
    
    .balls{
    background-image: url(images/r2.jpg);
    background-repeat: no-repeat;
    background-position: bottom right;
    width: 745px;
    height: 105px; 
    z-index: 3;
    }
    .b1{
    background-image: url(images/b1.jpg);
    background-repeat: no-repeat;
    background-position: bottom left;
    height: 37px; 
    width: 745px;
    }
    .b2{
    background-image: url(images/b2.jpg);
    background-repeat: no-repeat;
    background-position: bottom right;
    width: 164px;
    height: 37px;
    float: right;
    }
    the HTML
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" href="sw.css">
    </head>
    
    <body>
    <div align="center">
    <div class="container">
    <div class="top"></div>
    <div class="right">
    <div class="left">
    <div class="balls">
    <div class="content">
    <div class="content2">
          <p>ALL CONTENT</p>
    					
    </div></div>
    <div class="left1">
    <div class="left2">
    <div class="navt"> 
                  products 
                  <p class="navb"><a href="link.htm" class="nav">link</a><br>
            <a href="link.htm" class="nav">link</a><br>
                  <a href="link.htm" class="nav">link</a><br><a href="link.htm" class="nav">link</a><br><a href="link.htm" class="nav">link</a><br></p> 
    
    	  </div>
    	  </div>
    </div>
    </div>
    </div><div style="clear:both"></div>
    <div class="b1">
    <div class="b2"></div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>
    Thank you for any help - it's driving me nutz!

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Do you have a link to the page? Without seeing the image backgrounds or knowing what it's supposed to look like or having semantic class names, it's hard to know what's going on there.

  3. #3
    Join Date
    May 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Whoops - sorry about that!

    http://clients.locallink.com/sw/www2/

    Thank you for any help you can give.
    You can see it "correctly" in IE.

  4. #4
    Join Date
    May 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Anyone know how I can fix this?

    Thank you!

  5. #5
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there thebutterfly,

    the first thing that I noticed when viewing your page was that it was an excellent example of 'Divitis'
    Check out the symptoms here...

    I have therefore completely reworked the page as the attachment will show.

    coothead

  6. The Following User Says Thank You to coothead For This Useful Post:

    thebutterfly (05-12-2008)

  7. #6
    Join Date
    May 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi There

    Ahh.. yeah still learning the art of css layout - & yeah, I tend to get super div-crazy! hehehe I will go through this even more, I can learn a lot! Thank you!!!!

  8. #7
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    No problem, you're very welcome.

  9. #8
    Join Date
    May 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Oh no - problem. Now the overall layout does not strech to fit the content - it just goes over the lower stuff and disappers off the area. I really dont want to make a scrolling div - it really needs to stretch. Any thoughts?

  10. #9
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there thebutterfly,

    unfortunately, for me , you did not say that you wished to add extra content to the layout.

    Still, 'it's an ill wind that blows no good'.

    It means that you get your background-images refined somewhat.

    With added content they did look a little clumsy at the edges.

    coothead
    Last edited by coothead; 05-13-2008 at 10:18 AM. Reason: typo

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
  •