NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page div - stretch the nav to fit height of content

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-31-2005, 07:35 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: Florida
Posts: 233
TeviH is an unknown quantity at this point
 



div - stretch the nav to fit height of content


Hello all!

I have a little problem. I am trying to make 100% CSS no-tables design (finally). I have the navigation float:left to allow the main content to come and sit next to it. They're all in separate divs, and it's positioned fine. The only issue is that I have a background image in the navigation and I want to have the navigation fit the height of the main content so the background will repeat all the way to the bottom.

The whole page is centered in the screen.

Here's my code:

Code:
div#container {
	width: 760px;
	padding: 0px;
	margin-left: auto;
	margin-right: auto;
	border: 1px solid #000000;
	}

div#header {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	width: 760px;
	padding: 0px;
	margin: 0px;
	}

div#leftnav {
	text-align: center;
	width: 169px;
	background-image: url(http://cdn.namepros.com/images/sidenav-bg2.jpg);
	padding: 0px;
	margin: 0px;
	float: left;
	height: 100%;
	}
	
div#main {
	padding: 0px;
	margin-top: 0px;
	margin-left: 169px;
	width: 591px;
	}
I didn't expect the "height: 100%" to work... but what should I be doing?!
????: NamePros.com http://www.namepros.com/programming/119830-div-stretch-nav-fit-height-content.html

Thanks!
__________________
www.headlinercreative.com
TeviH is offline  
Old 08-31-2005, 07:49 AM   #2 (permalink)
NamePros Member
 
kpm547's Avatar
Join Date: May 2005
Location: Canada
Posts: 171
kpm547 is an unknown quantity at this point
 



try min-height:100%

That is supposed to work and probably will with FF, but EI Doesn't render it properly all the time.
__________________
www.twocrazyducks.com - Two Crazy Ducks Web Hosting - Lethbridge, Alberta
www.lasara.org - Lethbridge Area Search and Rescue
themuellers.ca - The Mueller Family Webpage
jobsitestructures.com - Job Site Structures Ltd. - for all your site office and accomodation needs!
kpm547 is offline  
Old 08-31-2005, 11:38 AM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: Florida
Posts: 233
TeviH is an unknown quantity at this point
 



doesn't work!

So much for a pure css site... be a lot simpler to just use tables. So far, I'm not convinced I need to switch 100%...... CSS is great, but some things are just done better in regular html.
__________________
www.headlinercreative.com
TeviH is offline  
Old 08-31-2005, 09:15 PM THREAD STARTER               #4 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: Florida
Posts: 233
TeviH is an unknown quantity at this point
 



Ok, curious for people's opinions (yes, this is an old topic, but rather than read an article or a book, I want to see your opinions.)-

I can do this page with CSS or HTML. HTML will require a table to set the layout, which is fairly compatible with every browser. Pure CSS - divs - to set the layout will require multiple divs, unnecessary divs, nested inside each other, all sorts of markup to make sure it displays correctly on all browsers....blahblahblha... Why would someone say to switch completely to CSS?! Sure I use CSS a lot to get the best out of my design, but why throw away something so simple and straightforward as HTML tables?!
__________________
www.headlinercreative.com
TeviH is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 08:28 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger