Thread: Div Problem

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2014
    Posts
    1
    Rep Power
    0

    Div Problem


    Hey guys, first time poster here at DevShed. I was wondering if any of you knew how to fix this error which I've recently been having, and trying to fix.

    HTML
    Code:
    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="global.css">
    <title>'ello</title>
    </head>
    <body>
    
    <div id="main">
    <div id="header"></div>
    
    <div id="textarealeft">
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    </div>
    
    <div id="textarearight">
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 
    </div>
    
    </div>
    
    </body>
    </html>
    Forgive the "Hello" spam, it's just a placeholder.

    CSS
    Code:
    body {
    background-color: grey;
    }
    
    #main {
    width: 90%;
    margin-left: 40px;
    margin-right: 40px;
    margin-top: -10px;
    margin-bottom: -10px;
    border: 1px solid #000000;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 15px;
    padding-bottom: 15px;
    background: #FFFFFF;
    position: fixed;
    }
    
    #header {
    background-image: url(images/test.jpg);
    background-repeat: no-repeat;
    border: 1px solid #000000;
    width: 100px;
    height: 80px;
    margin-left: 5px;
    margin-right: 5px;
    margin-top: 5px;
    margin-bottom: 15px;
    }
    
    #textarealeft {
    width: 45%;
    border: 1px solid #000000;
    padding: 10px;
    margin-left: 5px;
    margin-right: auto;
    margin-top: 5px;
    margin-bottom: auto;
    }
    
    #textarearight {
    float: right;
    width: 45%;
    border: 1px solid #000000;
    padding: 10px;
    margin-left: auto;
    margin-right: 5px;
    margin-top: 5px;
    margin-bottom: auto;
    }
    The DIV boxes seem to be a different heights, it's quite annoying; I have attempted to fix it using the position: relative element but it doesn't seem to fix things when changing how much is between the <div> tags.

    All help is much appreciated, thanks!
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2014
    Posts
    10
    Rep Power
    0
    Not sure if i have understood you right but to place both right and left textareas at the same level give:
    Code:
    #textarealeft { 
    float:left
    }

IMN logo majestic logo threadwatch logo seochat tools logo