...

View Full Version : I want my content to stay in place as i resize my browser window..any help?



masterc
06-10-2010, 05:23 AM
So basically what the title says..i need the content on my page to stay the same when i resize the browser without resizing itself and screwing with the format. something similar to the page at w3schools.com. when you drag the browser to the left it will only adjust a little bit but pretty much everything stays the same.

I hope i made sense. It's my first site and I have been stuck on this issue most of the day. any help or advice is appreciated thanks in advance

abduraooft
06-10-2010, 08:41 AM
It's very easy. Just set a fixed width to the outer container element. See some examples at http://bonrouge.com/3c-hf-fixed.php and http://bonrouge.com/2c-hf-fixed.php

masterc
06-10-2010, 08:26 PM
thanks that solved my problem. Now i have another little problem:


html {height:100%;}
body {
margin:0;
padding:0;
height:100%;
background-color:#ffffff;
font-family:arial, serif;
}
#wrap {
background:url(bg200W3.gif) top left repeat-y;
min-height:100%;
width:780px;
margin:auto;
position:relative;
}
* html #wrap {height:100%}

The part that says background:url(bg200w3.gif)
What i thought you are supposed to do is create an image 780px wide and 1x high. So i went into microsoft paint and did just that, then saved the image in my images folder for the site.

So instead of
background:url(bg200W3.gif),
i have in my code
background:url(images/780w.gif)

780w is the name of the image. It doesn't seem to make a difference when i insert this in. I have also tried just url(780w.gif). I am at a loss...any ideas?

Apostropartheid
06-11-2010, 03:32 PM
Your file structure must be like this for that to work:


/ (root, directory)
images (directory)
780w.gif
index.html

If index.html is in a folder other than root, it will not work.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum