Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Keeping DIV tags Displayed Correctly

 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • 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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • 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: 1619
1
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guessing you are not familiar with the box model



Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic