Div Margin Problem - Need Help

Discussion in 'HTML & Website Design' started by Enmar, Jul 6, 2008.

  1. #1
    This image should explain it all really.

    I want the darker gray to stay in the position it's at on that picture, while the lighter gray needs to move up to its original position, replacing the black. Explained more in detail with CSS code, etc.

    [​IMG]

    Here's the HTML code (with just divs showing, code removed)

    <div id="container">
    
    
    	<div id="header"></div>
    
    [B]Navbar is here in <ul> format[/B]
    
    
    <div id="content">
    				
    <div id="toppg">
    hello
    </div>
    	
    <div id="bottompg">
    </div>
    		
    </div>
    
    </div>
    Code (markup):
    This is probably an easy fix, but I'm no guru so thanks for the help.
     
    Enmar, Jul 6, 2008 IP
  2. Enmar

    Enmar Active Member

    Messages:
    177
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #2
    I see it works fine in IE, how ironic.
     
    Enmar, Jul 6, 2008 IP
  3. skenk

    skenk Banned

    Messages:
    180
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    use....
    toppg{
    position: absolute;
    top: 12px;
    left: 12px}

    Change the 12's until it sits where you need it... Give me a shout if you have problems
     
    skenk, Jul 6, 2008 IP
  4. Enmar

    Enmar Active Member

    Messages:
    177
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Damnit I was thinking that but I've had bad experiences with absolute text so I didn't want to put it lol -.-

    Works fine now :D

    Thank you sir.
     
    Enmar, Jul 6, 2008 IP
  5. skenk

    skenk Banned

    Messages:
    180
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    No problem :)
     
    skenk, Jul 10, 2008 IP