|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
height problem in CSS/ XHTML
Hi all,
I am new in the forum section. i am creating a site in XHTML and CSS purely and i am facing a problem in the height of a div. i want 2 columns on a page and these columns' height should be dynamic. page size also depends on these divs, as much the text in any of the column, as much the page height. i have tried with height:100px, height:100%, min-height:100px. but i am unable to get the correct solution. one more problem, i also want to run this page on different browser. the current page is running well on IE-6 and FireFox, but not on IE-3, Opera-7 and other. if anyone have solution, please let me know. thanks. |
|
#2
|
||||
|
||||
|
A common solution to this problem is to create "fake-columns"
It's only feasible when you knwo one column is always going to be slightly larger. You'll have two containing elements (likely DIVs), one for each column. Wrap both of those in an outer element (again, DIV) Set the background colour on the column DIV's as desired... Set the background-colour on the outer DIV to match the column which will likely be shorter. I've attached a quick example, rename it to HTM. |
|
#3
|
||||
|
||||
|
If you want both columns to be dynamic, just don't set the height at all. This way the column expands when there's more text.
Good luck and please show us the result! Greets, Spongy
__________________
Work to live, don't live to work |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Advanced Web Development > height problem in CSS/ XHTML |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|