• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Keeping DIV tags Displayed Correctly

 
Ranch Hand
Posts: 2119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using IE 7.0.

I have a main page with three DIV tags:
1. Header width 100% height 10%(float: left)
2. Navigation width 20% height 90%(float: left)
3. Content width 80% height 90%(float: left; overflow: auto)

With in the Content tag I load a JSP with several div tags.

My problem is when the window is sized down the div tags do not stay displayed as designed. The div tags move underneath(bottom) of each other.

I expected the overflow in the above Content div to add scroll bars so the div layout would remain intact.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem comes in with odd widths.

Take a look at the Holy Grail article.

Eric
 
Steve Dyke
Ranch Hand
Posts: 2119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:Problem comes in with odd widths.

Take a look at the Holy Grail article.

Eric



I am still having problems just trying the example given.

When I pad the contents to the left 200px, then set the center contents to 100% width the page scrolls to the right by the 200px.

Why wouldn't a div padded by 200px and set to 100% width just occupy the visible window? Shouldn't the 100% width control this?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guessing you are not familiar with the box model



Eric
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic