TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-31-2009, 09:07 PM   #21 (permalink)
The Contributor
 
Join Date: Nov 2008
Location: Sweden
Posts: 36
Thanks: 1
hjalmar is on a distinguished road
Default

Quote:
Originally Posted by allworknoplay View Post
I have a quick question about DIV's.

I have a main body container that has a fixed width of 1024. And the minimal height is 350 px.

The reason for the min height is that I want all pages to have a consistent look, even if there's not much content.

But when the content exceeds the 350 px, the content just flows passed the DIV container.

Is is possible for the DIV container to have the DIV stretch beyond the 350 px if the content is a lot?

Basically the same way that tables would handle it?
Can you provide some markup for what you are trying to do?

And as far as min/max-width/height: goes, it isn't supported in older browsers so take that into account if doing a scalable/fluid design. Actually i think IE7 treats it as width/height only and IE6 and older ignores it completly.

With some code you'll get a more accurate response :D

Hjalmar
hjalmar is offline  
Reply With Quote
Old 06-01-2009, 02:19 PM   #22 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by hjalmar View Post
Can you provide some markup for what you are trying to do?

And as far as min/max-width/height: goes, it isn't supported in older browsers so take that into account if doing a scalable/fluid design. Actually i think IE7 treats it as width/height only and IE6 and older ignores it completly.

With some code you'll get a more accurate response :D

Hjalmar
Sure, here's my CSS:

Code:
.body_main {
	background:#FFFFFF;
	margin-top: 200px;
	width: 1024px;
	height: 500px;
	margin: auto;
	padding: 5px 5px 5px 5px;
	border: 1px solid #CCCCCC;
}
Then I create the main DIV container like this:

Code:
<div class="body_main"></div>
So when there is a lot of content, it just flows pass the height that I set at 500px. I don't want the content to be hidden or flow pass the div container, I'd like it to stretch the height as much as it needs to for it's content.

I haven't tried Tanax's tip yet but I will today...
allworknoplay is offline  
Reply With Quote
Old 06-01-2009, 02:50 PM   #23 (permalink)
The Contributor
 
Join Date: Nov 2008
Location: Sweden
Posts: 36
Thanks: 1
hjalmar is on a distinguished road
Default

Quote:
Originally Posted by allworknoplay View Post
Sure, here's my CSS:

Code:
.body_main {
	background:#FFFFFF;
	margin-top: 200px;
	width: 1024px;
	height: 500px;
	margin: auto;
	padding: 5px 5px 5px 5px;
	border: 1px solid #CCCCCC;
}
Then I create the main DIV container like this:

Code:
<div class="body_main"></div>
So when there is a lot of content, it just flows pass the height that I set at 500px. I don't want the content to be hidden or flow pass the div container, I'd like it to stretch the height as much as it needs to for it's content.

I haven't tried Tanax's tip yet but I will today...
I'm afraid his method wont work, it's not about clearing anything. Now as I said in my previous reply there is a css property that is called min-height:, max-height... etc (look a post up :)) but the support for it is well pretty bad. :/

There could be some ways around it but that depends on your full markup and the design in question. could it be that you are trying to achieve a faux column type effect? because there is a hack where you push your element to be verry long and then making it adjust/wrap to it's content with negative values again.

But it all depends really, can you maybe post the full code and/or atleast a screenshot of the design?

There is some downsides tothat method, and that is that it has to have a wrapper and thata wrapper must be positioned (relative/absolute/never tried fixed as it is also crappy supported in IE) for opera not to flip out, and IE6 and it's annoying stackorder :(.

Code:
#container{
position: relative; /* for opera , also remember that IE makes a new stackorder for positioned elements so for a more complex layout there could cause some issues. */
overflow: hidden;
}

#element_to_span{
margin: 0 0 -30000px;
padding: 0 0 30000px;
}
I've found that going over 32000px causes some issues in firefox with the border, dunno if there would be more issues but yeah 30k is a lot

Last edited by hjalmar : 06-01-2009 at 03:12 PM.
hjalmar is offline  
Reply With Quote
The Following User Says Thank You to hjalmar For This Useful Post:
allworknoplay (06-01-2009)
Old 06-01-2009, 04:50 PM   #24 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Ok, I will post a screenshot or atleast a photoshop of what I'm trying to do. It's actually been bugging me for awhile so it's good to have some expertise around here and just figure out what is the PROPER way to handle it once and for all...

I'll that to you a little later today since I gotta do some spring cleaning...

allworknoplay is offline  
Reply With Quote
Old 06-05-2009, 12:37 AM   #25 (permalink)
The Contributor
 
Join Date: Nov 2008
Location: Sweden
Posts: 36
Thanks: 1
hjalmar is on a distinguished road
Default

I'm getting bored here. did you solve it? :D
hjalmar is offline  
Reply With Quote
Old 03-04-2012, 10:18 AM   #26 (permalink)
The Wanderer
 
Join Date: Feb 2012
Location: China
Posts: 7
Thanks: 0
nasack is on a distinguished road
Default

I hate IE6, In China 80% user's brower is IE6, When you make a new website, you need spend to many time to make is work well in IE6.
__________________
:-PWeb Design Guangzhou
:-PWeb Development
nasack is offline  
Reply With Quote
Old 03-04-2012, 10:20 AM   #27 (permalink)
The Wanderer
 
Join Date: Feb 2012
Location: China
Posts: 7
Thanks: 0
nasack is on a distinguished road
Default

Used Aircraft to Sale
__________________
:-PWeb Design Guangzhou
:-PWeb Development
nasack is offline  
Reply With Quote
Reply



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

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 05:33 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design