Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preserve positioning of HTML page when window minimized [closed]

I have a problem with my page.
Whenever I minimize the window the positioning of all the elements goes off and things get distorted.

like image 993
rajprashanth r Avatar asked Jan 29 '11 12:01

rajprashanth r


People also ask

How do I keep my position fixed in HTML?

To create a fixed top menu, use position:fixed and top:0 . Note that the fixed menu will overlay your other content. To fix this, add a margin-top (to the content) that is equal or larger than the height of your menu.

How do I keep my Div fixed?

A pinned-down menu The interesting rule here is the ' position: fixed ', that makes the DIV stay fixed on the screen. The ' top: 50% ' and ' right: 0 ' determine where the DIV is displayed, in this case: 50% down from the top of the window, and a constant 0px from the right.


1 Answers

If the elements go off their position when you make your browser window too small, use the CSS min-width property. It makes the web browser show the scroll bar instead of trying to shrink the web page.

Like this:

body {
    min-width: 700px;
}
like image 127
Arseny Avatar answered Sep 25 '22 22:09

Arseny