Site page layout width

I created a homepage for my site. Now it remains only to indicate the value of c. After much discussion, I decided to go with a fixed page layout. How should I do it? How to place everything within 750 pixels (or whatever you suggest)?

+3
source share
6 answers

make container div

<div id="container">
   <!-- Your content goes here-->
</div>

and use the following css

#container{width:750px; margin:0 auto}

css sets the width using "width" and writes "margin" as it centers the div in the browser window. those. top, bottom, right. This means that the edge at the top and bottom of the page is β€œ0” and the right and left are β€œauto”.

+4
source

960 Grid Gabriel, Blueprint.

+3

DIV :

#wrap_div {width:750px; margin: 0 auto;}

, :)

+3
+2

.. 750 ( )?

960px ( , ). 1024x768 ( ), 800x600 : http://www.w3schools.com/browsers/browsers_display.asp

+2

. , . ,

{: 900px;}

child1 {width: 40%;}

child2 {width: 40%;}

etc.;

Problems can occur at low monitor resolutions if you insert large px values ​​for internal elements at a fixed div position. In this case, the elements in the div can spread from their boxes when viewed in resolution 1024x768. It’s best to keep the children as a percentage so that the div’s position moves relative to the size of the browser window. I learned this hard way.

+1
source

Source: https://habr.com/ru/post/1769913/


All Articles