This is a discussion on "box model problem" within the Web Page Design section. This forum, and the thread "box model problem are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
box model problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
box model problem
hey guys
i've laid out three div layers on my page. left div and right div are held within container div. the container alignment is set to right, the left div is set to float to the left. this allows me to have the two div layers side by side. i'm having difficulty with it though - even with the height of the left div fixed at 200px, it only shows if the content in the right div is equal to or greater than 200. if the content in the right div is less than 200, both divs are only shown until the content in the right div ends. how do i get the left div to stay the set height of 200px? |
|
|
|
||||
|
Re: box model problem
you will need to use the faux columns method for this.
Check out his article: http://www.alistapart.com/articles/fauxcolumns/
__________________
WelshStew Lead Administrator tierney rides tboard - uk site | xtreme wales - extreme clothing If you think I've helped, click the "Thanks" webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
|
|
|||
|
Re: box model problem
said article indicated that css will stretch the div only as much as it needs to vertically.
my problem is that there IS content in the div that isn't being displayed. the column that's floated to the left will only display as far down as there is content in the right. surely if there is content in the left it should stretch to display that? |
|
||||
|
Re: box model problem
Quote:
In your case, the left column (even though it's 200px high) will not push the container down. You need to clear the float in order to do so. Use this slice of CSS on your container;
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
|
|
|||
|
Re: box model problem
thanks for the replies guys, i really appreciate it.
tried the :after code, still not displaying the image. it looks like this ![]() tried on both the container div and the floating div. i've been taught this way to lay out columns, having i been doing it wrong all along?! the site is already using nested divs to layout the navigation on the left and content on the right. these are further nested. are they ALL wrong?! |
|
|||
|
Re: box model problem
(the green and blue are just so i can see the layers at the moment. im converting it from tables) (the cart software all runs on tables).
|
|
||||
|
Re: box model problem
Sorry artisites, but a link would really help. If you can't get it hosted, could you post the HTML and CSS you're having issues with?
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
|
|
|||
|
Re: box model problem
http://www.artisites.net/test.html
it's fine when there's pleanty text in the description because it brings the left div down. |
|
|||
|
Re: box model problem
nevermind - i've separated the bottom related products div from outside the top container and now it's working, with the code you provided aso186.
thanks for all your help! |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| First image problem and inline list problem | konnor5092 | Web Page Design | 8 | Dec 1st, 2007 09:08 |
| Box Model Hack? | jwalker80 | Web Page Design | 4 | Feb 2nd, 2007 02:10 |
| Fluid box - without box model | satoshy | Web Page Design | 5 | Aug 3rd, 2005 03:24 |