Set minimum for the box width

webdesign

Well-known member
Joined
Jul 5, 2012
Messages
120
Points
0
A very handy CSS command that exists is the min-width command, min-height, whereby you can specify the minimum width for any element. This can be especially useful to determine the minimum width for a page.

#container {
min-width: 600px;
width:expression(document.body.clientWidth < 600? "600px": "auto" );
}
<div id="container">
your content here
</div>
 

Marc0

Well-known member
Registered
Joined
Jun 6, 2012
Messages
890
Points
28
is this tips for using min-width in Css ?
 

Noticed

New member
Registered
Joined
Aug 1, 2012
Messages
7
Points
0
Thanks for the tip, i've always just used min-width: __px; never the line under it.
 
Older Threads
Replies
1
Views
2,418
Replies
1
Views
2,078
Replies
2
Views
3,049
Replies
7
Views
11,656
Replies
4
Views
11,565
Newer Threads
Replies
5
Views
4,422
Replies
5
Views
3,138
Replies
8
Views
3,556
Replies
9
Views
3,612
Replies
7
Views
3,398
Latest Threads
Replies
0
Views
31
Replies
1
Views
75
Replies
1
Views
158
Replies
1
Views
157
Replies
1
Views
173
Recommended Threads

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top