thenewbie
thenewbie

Reputation: 805

Html div resize after putting some text

Guys.. I want my html div not to resize after putting some text.. as you can see in the picutre above is set the minimum height as 250px; but after putting some LAYER 1
manytime. may 20 times, im expecting that the div height will be 250 px but it automaticaly resize? Anyone know how to set the height of the div as fix? even adding a text to it will not make the div automaticaly resize? Thank you..

enter image description here

Upvotes: 1

Views: 157

Answers (3)

Daedalus
Daedalus

Reputation: 7722

Try the following; note that you'll want overflow:hidden; if you don't want the content to spill out of the div:

div#yourid {
    height: 250px;
    overflow: hidden;
}

DEMO

Upvotes: 3

Anton Soradoi
Anton Soradoi

Reputation: 1851

set both min-height and max-height to 250

Upvotes: 3

Sidharth Mudgal
Sidharth Mudgal

Reputation: 4264

Instead of setting minimum height as 250px, set height as 250px...

Upvotes: 5

Related Questions