Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it Possible to Set a "Minimum Distance from Left" Value for a DIV?

I'm building a page which is static vertically, but allows the space between page elements to grow when the user expands the window. This works fine. However, I'd like to set a minimum width for the page so that the elements stop shrinking together when the user resizes the window below a predetermined width, to prevent them overlapping.

I think the solution is probably simple, but I can't figure it out. I've set the DIV which contains "Recent News" to 48px from the right, absolutely positioned, and I'd like to set something similar so that it never gets closer than 800px (or whatever) from the left edge of the window.

I can post code snippets, but not sure what CSS would be useful right now.

You can see the problem I'm having here: http://www.cjfoote.co.uk/news/index.html

like image 963
Chris Foote Avatar asked Jan 25 '12 17:01

Chris Foote


1 Answers

Use the css property min-width. This will make it so that when under certain width, it will not get any smaller.

See Also

CSS min-width Property

like image 174
blo0p3r Avatar answered Sep 29 '22 07:09

blo0p3r