What am I doing wrong?

Discussion in 'CSS' started by Mackos, Apr 28, 2010.

  1. #1
    Hi guys!
    I'm making auction template, and I have error that I cant figure out.

    So can you tell me what causing this error (marked in red):
    [​IMG]

    This is the code of the website (it have to be without external css file):
    <body style="margin: 0; padding: 0; font-size: 100%; background: #D8DDD7">
    <div style="height: 48px; background: #2A363B"> </div><!-- gorny panel-->
    <div style="position: absolute; padding:0 54px 0 62px"><img src="logo.jpg" ></div><!-- logo -->
    
    <div style="position: relative; top: 325px; height: 94px; background-image: url(navbar-bg.jpg); background-repeat: repeat-x; color: white; font-weight: 700;">Kontakt</div><!-- navbar -->
    <div style="position: relative; top: 330px; height: 585px; left: 96px; background-image: url(box-top.jpg); background-repeat: no-repeat;"></div><!-- box-top -->
    <div style="position: relative; top: -196.5px; left: 87px; background-image: url(box-main.jpg); background-repeat: repeat-y;"><br>dsfsdfds<br>fvdfdsfsf</div><!-- box-main-->
    <div style="position: relative; left: 87px;></div><!-- box-bottom -->
    HTML:
     
    Mackos, Apr 28, 2010 IP
  2. HighRankingSEO

    HighRankingSEO Well-Known Member

    Messages:
    423
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    125
    #2
    To be honest the code looks kind of screwed up from the get go... The positioning is screwy...

    Are you trying to have the 2 bars span full width?....to get rid of the scroll bad just get rid of relative positioning from the left....let me know what you are tryying to do....you need to rewrite this code...use margins as well....it would help to know what you want your layout to look like...

    real quick just to get rid of the scroll bar...remove all the left relative positioning
    
    
    <body style="margin: 0; padding: 0; font-size: 100%; background: #D8DDD7">
    <div style="height: 48px; background: #2A363B"> </div><!-- gorny panel-->
    <div style="position: absolute; padding:0 54px 0 62px"><img src="logo.jpg" ></div><!-- logo -->
    
    <div style="position: relative; top: 325px; height: 94px; background-image: url(navbar-bg.jpg); background-repeat: repeat-x; color: white; font-weight: 700;">Kontakt</div><!-- navbar -->
    <div style="position: relative; top: 330px; height: 585px; background-image: url(box-top.jpg); background-repeat: no-repeat;"></div><!-- box-top -->
    <div style="position: relative; top: -196.5px; background-image: url(box-main.jpg); background-repeat: repeat-y;"><br>dsfsdfds<br>fvdfdsfsf</div><!-- box-main-->
    <div style="position: relative;"></div><!-- box-bottom -->
    Code (markup):
     
    HighRankingSEO, Apr 28, 2010 IP
    Mackos likes this.
  3. Mackos

    Mackos Well-Known Member

    Messages:
    364
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Thanks!
    It works now.
    What I want to do ... I want to make some div's centered and working on all screen resolution's
    This is my layout:
    [​IMG]
     
    Mackos, Apr 29, 2010 IP
  4. antipot

    antipot Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    #wrapper {
    margin-right: auto;
    margin-left: auto;
    }
     
    antipot, Apr 30, 2010 IP