Results 1 to 4 of 4

Thread: . CSS Question

  1. #1
    Join Date
    Jan 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default . CSS Question

    divToolbarBox1 divToolbarBox2 divToolbar

    first two areplaced in boxes and 3rd one encloses the two boxes

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    And? Is there a question you have?
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jan 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You have 3 div elements with id’s:
    • divToolbar – Is a container element that will occupy the top of the page 800x25 px
    • divToolbarBox1 – Is a small box inside a toolbar that will be aligned left and be 150x25 px
    • divToolbarBox2 – Is a small box inside a toolbar that will appear right next to divToolbarBox1 and be 200x25 px

    CSS for all three div elements so that they will align

  4. #4
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    Code:
    div#divToolbar {
    position: absolute;
    top: 0px;
    width: 800px;
    height: 25px;
    }
    
    div#divToolbarBox1 {
    float: left;
    width: 150px;
    height: 25px;
    }
    
    div#spacer {
    float: left;
    width: 450px;
    height: 25px;
    }
    
    div#divToolbarBox2 {
    float: left;
    width: 200px;
    height: 25px;
    }
    That should work just fine, remember to have it setup like:

    Code:
    <div id="divToolbar">
    <div id="divToolbarBox1">
    blah blah
    </div>
    <div id="spacer">
    </div>
    <div id="divToolbarBox2">
    blah blah
    </div>
    </div>
    Tim

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
  •