Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Questions about divs

    Question 1:

    There is two boxes side by side, and I type something to the box at the right side until it stretches. Is there a way to get the empty box at the left side to stretch along with the box at right side?

    Here's an example:

    http://divlayout.cjb.net

    Source code:

    <html>
    <head>
    <title>
    asd
    </title>
    <style type="text/css">

    div#box {
    width:150px;
    height:250px;
    border:1px solid #000;
    float:left;
    border-right:0px;
    }

    div#box2 {
    width:150px;
    border:1px solid #000;
    float:left;
    }

    </style>
    <body>

    <div align="center">

    <div id="box">
    </div>

    <div id="box2">
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    Text text text text text<br>
    </div>

    </div>
    </body>
    </html>
    Question 2:

    If I center something at the top of the page, it will always leave an empty space between the top of the page and the object. How could I remove the empty space?
    Last edited by Tehaxor; 10-23-2006 at 05:26 PM.

  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,801
    Thanks
    8
    Thanked 131 Times in 129 Posts
    1) Search for "Faux Columns". There really isnt a non-javascript way to make them the same height. You can use a background-image to "fake it" though.

    2)
    Code:
    body {
    padding: 0;
    margin: 0;
    }
    should help out if I understand the question correctly.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis

  • #3
    New Coder
    Join Date
    Sep 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by harbingerOTV View Post
    1) Search for "Faux Columns". There really isnt a non-javascript way to make them the same height. You can use a background-image to "fake it" though.

    2)
    Code:
    body {
    padding: 0;
    margin: 0;
    }
    should help out if I understand the question correctly.
    Okay, thanks for your help. And yes, you did understand the second question :P.

  • #4
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    as someone on w3c's forums said, your searching for the holy grail


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •