Log in

View Full Version : How to control the stretchness of the page



vinay111
04-30-2010, 04:23 PM
Would request if you could assist how can I control the stretchness of a page. For example the width of the container is at 100%. The site will look like fully stretched across the monitor be it 17 inches or more.

How can I control the width of the web page so that the site does not look fully stretched but remained at the centre of the monitor screen.

Thank you,:(

bluewalrus
04-30-2010, 04:37 PM
100% is the full browser window, down it to 90% and give it a margin:auto;. This should give it a %5 border on the left and right. If you want better assistance please post a link or code.

vinay111
04-30-2010, 05:13 PM
Thank you for the prompt answer.:(

Here is the URL of the site I am asking for :
http://www.bookmyhotel.biz . On larger monitors i.e. 22 inch, the site is stretched out on the whole screen. It looks bad. If the container is centered and didn't stretched it would look great.

Thanks

bluewalrus
04-30-2010, 07:36 PM
Can you screen shot what is happening I dont have a 22 inch monitor. I think your referring to the right column separating from the left though?

BLiZZaRD
04-30-2010, 08:01 PM
In your CSS find this:



#container {
width: 100%;
margin: 0;
background-color: #fff;
position: relative;
}


Change it to this:



#container {
width: 96%;
margin-left: auto;
margin-right: auto;
background-color: #fff;
position: relative;
}

vinay111
05-01-2010, 04:31 PM
Thank You! BLiZZaRD:p

vinay111
05-05-2010, 02:40 PM
Hi,

I have seen if you see the site on a 19 inches or 22 inches monitor the middle content is stretched showing white space in between the two columns.

Any suggestions pl.

Thank you.:o

BLiZZaRD
05-14-2010, 09:11 PM
You will have to do the same thing for each section as I listed above, giving a slightly less than 100% width and setting left and right margins to auto.