473,322 Members | 1,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

minimum height

I have some divs (float: left) that I'd like to set a minimum height
on. What's the level of support on min-height and are there any bugs I
need to watch out for.

I've never used this, and I have some memory of there being a problem
with it somewhere.

Jeff
Mar 23 '06 #1
15 1974
Jeff wrote:
I have some divs (float: left) that I'd like to set a minimum height
on. What's the level of support on min-height and are there any bugs I
need to watch out for.

I've never used this, and I have some memory of there being a
problem with it somewhere.

Jeff
Either firefox or internet explorer (I thinkt the latter) does not support
it. I would add an image (or a div within the div) with width 1px and
height your min-height.
Nicolaas


Mar 23 '06 #2
Jeff <do*********@all.uk> wrote:
I have some divs (float: left) that I'd like to set a minimum height
on. What's the level of support on min-height and are there any bugs I
need to watch out for.


IE doesn't support it, but it treats "height" as min-height, so a cross
browser min-height solution is:

..YourClass{min-height:10em;height:10em}
*>.YourClass{height:auto}

--
Spartanicus
Mar 23 '06 #3
Spartanicus wrote:

Glad to see you are still hanging out here.
Jeff <do*********@all.uk> wrote:

I have some divs (float: left) that I'd like to set a minimum height
on. What's the level of support on min-height and are there any bugs I
need to watch out for.

IE doesn't support it, but it treats "height" as min-height, so a cross
browser min-height solution is:

.YourClass{min-height:10em;height:10em}
*>.YourClass{height:auto}

*> that is something I haven't used either. I don't even know what to
call it! Let me know so I can google it.
Cheers,
Jeff
Mar 24 '06 #4
Jeff wrote:

.YourClass{min-height:10em;height:10em}
*>.YourClass{height:auto}


*> that is something I haven't used either. I don't even know what to
call it! Let me know so I can google it.

"*" is the universal selector; it applies to all objects.
">" is the child selector.
Put together it means "for a child of any object" apply this style.
It is not supported by IE6 and earlier so is ignored. IE also ignores
min-height:10em leaving a net style of height:10em, which it incorrectly
treats as min-height.
Modern browsers recognize " * > " and apply the style overriding the
height:10em previously specified.
(Isn't this fun? Yee haw!)

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 24 '06 #5
Jim Moe <jm***************@sohnen-moe.com> wrote:
"*" is the universal selector; it applies to all objects.


It matches any *element*.

--
Spartanicus
Mar 24 '06 #6
>> .YourClass{min-height:10em;height:10em}
*>.YourClass{height:auto}

*> that is something I haven't used either. I don't even know what to
call it! Let me know so I can google it. is the child selector which IE doesn't support

* is a wildcard.

--

Bye.
Jasen
Mar 24 '06 #7
Jim Moe wrote:

"*" is the universal selector; it applies to all objects.
">" is the child selector.
Put together it means "for a child of any object" apply this style.


Wouldn't that pretty much mean every object, except the <body>?
Mar 24 '06 #8
Tony wrote:

"*" is the universal selector; it applies to all objects.
">" is the child selector.
Put together it means "for a child of any object" apply this style.


Wouldn't that pretty much mean every object, except the <body>?


Every element except <html>.
I suppose the OP could be more specific about which element and child to
constrain the height property rather than use "*".

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 24 '06 #9
Jim Moe wrote:
Tony wrote:
"*" is the universal selector; it applies to all objects.
">" is the child selector.
Put together it means "for a child of any object" apply this style.


Wouldn't that pretty much mean every object, except the <body>?


Every element except <html>.


Makes it seem rather pointless...
Mar 24 '06 #10
On 2006-03-24, Tony <to****@dslextreme.WHATISTHIS.com> wrote:
Jim Moe wrote:

"*" is the universal selector; it applies to all objects.
">" is the child selector.
Put together it means "for a child of any object" apply this style.


Wouldn't that pretty much mean every object, except the <body>?


<body> is a child of <html>.

Bye.
Jasen
Mar 25 '06 #11
On 2006-03-24, Tony <to****@dslextreme.WHATISTHIS.com> wrote:
Jim Moe wrote:
Tony wrote:
"*" is the universal selector; it applies to all objects.
">" is the child selector.
Put together it means "for a child of any object" apply this style.

Wouldn't that pretty much mean every object, except the <body>?


Every element except <html>.


Makes it seem rather pointless...


no, it makes a non-ie filter a way to hide valid styles from IE where it will
mis-represent them.

--

Bye.
Jasen
Mar 25 '06 #12
Jim Moe <jm***************@sohnen-moe.com> wrote:
"*" is the universal selector; it applies to all objects.
">" is the child selector.
Put together it means "for a child of any object" apply this style.


Wouldn't that pretty much mean every object, except the <body>?


Every element except <html>.
I suppose the OP could be more specific about which element and child to
constrain the height property rather than use "*".


Hold on, the example I provided uses a class as well. I used "*" since
that would allow the OP to use the code example by only changing the
class name. Using "*" also means that the CSS code will survive a change
in the markup (bar a class name change).

--
Spartanicus
Mar 25 '06 #13
Spartanicus wrote:
"*" is the universal selector; it applies to all objects.
">" is the child selector.
Put together it means "for a child of any object" apply this style.

Hold on, the example I provided uses a class as well. I used "*" since
that would allow the OP to use the code example by only changing the
class name. Using "*" also means that the CSS code will survive a change
in the markup (bar a class name change).

Ah! So it is better phrased as "an element that is a child of any
element and uses .YourClass"?

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 25 '06 #14
Jim Moe wrote:
Spartanicus wrote:
> "*" is the universal selector; it applies to all objects.
> ">" is the child selector.
> Put together it means "for a child of any object" apply this style.

Hold on, the example I provided uses a class as well. I used "*" since
that would allow the OP to use the code example by only changing the
class name. Using "*" also means that the CSS code will survive a change
in the markup (bar a class name change).


Ah! So it is better phrased as "an element that is a child of any
element and uses .YourClass"?

In an off hand way, that makes perfect sense. Thanks to all.

I use descendants quite a bit.

#some_container p{...

Am I correct in assuming that the child selector works the same way,
except that it must be a "first order descendant"?

#some_container > p{...

<div id="some_container">
<p>styled</p>
<p>also styled</p>
<div><p>not styled by that child selector</p></div>
....

Cheers,
Jeff
Mar 27 '06 #15
Jasen Betts wrote:
On 2006-03-24, Tony <to****@dslextreme.WHATISTHIS.com> wrote:
Jim Moe wrote:
Tony wrote:
> "*" is the universal selector; it applies to all objects.
> ">" is the child selector.
> Put together it means "for a child of any object" apply this style.

Wouldn't that pretty much mean every object, except the <body>?

Every element except <html>.


Makes it seem rather pointless...

no, it makes a non-ie filter a way to hide valid styles from IE where it will
mis-represent them.


AH - ok. I try REALLY hard to avoid such things (using hacks that hide
styles from specific browsers), so I don't recognize them so readily.
But now you mention it, I do remember seeing that a couple times.
Mar 27 '06 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Chandler | last post by:
Hi, I have a div with a background image. The height of the div needs to stretch to accomodate any changes of internal content, but needs to remain at least 400px so that the background image is...
0
by: chrisc22 | last post by:
Hi, I have a problem that goes something like this: I want to determine the minimum height that a label control can have, given an arbitrarily long string, that will make all text visible, with 0...
2
by: Hennie de Nooijer | last post by:
Because of an error in google or underlying site i can reply on my own issue. Therefore i copied the former entered message in this message....
2
by: Rob T. | last post by:
I'm trying to use a div tag to make an element of height 16 pixels but IE forces it to be 19 pixels. Anything smaller than 19 gets enlarged to 19. Is there any way around this? #row1 {...
2
by: Chuck Bowling | last post by:
I'm trying to figure out how I can get the minumum height required for a textbox containing a string in a given font with a set width and also the converse, the minimum required width of a textbox...
3
by: MLM450 | last post by:
I have extended the open file dialog as described in the MSDN article "Extend the Common Dialog Boxes Using Windows Forms 1.x". I now need to change the minimum height of the dialog. How do I do...
3
by: manxie | last post by:
Dear All Readers, I'm supposed to create a program with a switch and using voids to execute number of codes, that includes finding sum, average, maximum, and minimum, please read my code:...
2
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, you know how you can set the with of a textbox to say something like 50% and then as you change the size of the browser the textbox changes accordingly. is there a way that if the browser...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.