Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimum Div Size?

Tags:

html

css

I am creating a website that uses a fluid layout with artificial columns. I have an image at the top with some text to the side. I want the image to have a minimum size of 550px and a maximum size of 75% of the parent div. I tried this:

.class{
    width: 550px;
    maxwidth: 75%;
}

but it did not work.

like image 592
Hawkcannon Avatar asked Mar 17 '26 14:03

Hawkcannon


2 Answers

Try:


.class {
    min-width: 550px;
    width: 75%;
}

like image 108
Tom Avatar answered Mar 20 '26 06:03

Tom


The current CSS spec supports min-width and max-width, but not all browsers do. Namely, IE6. But most all other browsers on the market work fine.

like image 20
Matchu Avatar answered Mar 20 '26 05:03

Matchu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!