Advanced Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignAdvanced Web Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 27th, 2005, 07:47 AM
him_surya him_surya is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 6 him_surya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 44 m 10 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old July 27th, 2005, 08:19 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
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.
Attached Files
File Type: txt div.txt (2.4 KB, 822 views)

Reply With Quote
  #3  
Old October 19th, 2005, 04:30 AM
Spongy's Avatar
Spongy Spongy is offline
Alternately High
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Hilversum, Netherlands
Posts: 223 Spongy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 56 m 41 sec
Reputation Power: 5
Send a message via MSN to Spongy
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignAdvanced Web Development > height problem in CSS/ XHTML


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT