SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: nesting divs

  1. #1
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool nesting divs

    hey all

    let me see if i can explain this

    ok its starts like this
    i have a #left div (navigation) and a #content div (content)

    Code:
    #content {
     background-color: #FBF8CC;
     position: absolute;
     left: 228px;
     top:0; 
     width: 500px; 
     height: 544px;
     border: 1px solid #CAC999;
    }
    * html #content{
     width:502px;
     w\idth:500px;
     height:546px;
     he\ight:544px;
    }
    that is the code for my content

    right now i have a fixed height
    and thats good
    but INSIDE that i want to put a div that i can scroll down but it stays inside this cell is there a way of doing this ?
    i tried a couple of htings but they dodn't work

    thanks

  2. #2
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so wait, i guess what i am saying is that i would like for my content cell to stay fixed at all time,size position etc. but the stuff "inside" of it to move if i need it to.


  3. #3
    SitePoint Evangelist
    Join Date
    Feb 2005
    Posts
    581
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What couple things did you try? You should be able to set an explicit height and width and then use "overflow:scroll".
    I will not flame the newbies,
    I will not flame the newbies,
    I will flame the newbies...
    Table free is the way to be!

  4. #4
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey thats cool

    i didn't know about that , my css skills aren't all that

    but now i have another question, can i make it so it only the vertical scroll bar ?
    i tried doing " overflowY:auto" (which is what i found on the net) but it didn't work and i can't seem to find anything else

    thx again

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Just use overflow:auto and it will only apply the scrollbar to the side thats needed. Usually that will be vertical. If both scrollbars appear then your content is too wide.

  6. #6
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks paul

    hmmm i do have it as overflow:auto . so... i think its because my title graaphic takes up the full width, and i wonder if i can force it to not display at all ? or maybe make the image less visible

  7. #7
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Just make sure its smaller than the content width


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
  •