Hawkcannon
Hawkcannon

Reputation: 237

Minimum Div Size?

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.

Upvotes: 3

Views: 9447

Answers (4)

Boody
Boody

Reputation: 35

I know that is request is old, but this will perhaps help some other people having the same problem.

I had the same worry and this resolve it:

.class {    
    min-height: 300px;
    height: auto !important;
    height: 300px;
}

Upvotes: 0

Tom
Tom

Reputation: 19304

Try:


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

Upvotes: 4

Alan Haggai Alavi
Alan Haggai Alavi

Reputation: 74202

Try replacing maxwidth with max-width.

Upvotes: 0

Matchu
Matchu

Reputation: 85794

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.

Upvotes: 3

Related Questions