View Full Version : resizing


dhboring
09-28-2009, 05:30 PM
Hey, new here. just trying to put my website up and on the map!
Basically, the problem I've been running into, and there is most likely an easy answer to this as I am an html novice, but I want to be able to set a size to my page...
not the window of the browser necessarily... but of the page itself. basically... the question i have is... is there any way to set the size of the page itself so that when I try and center everything it doesnt center in the middle of the browser window, but rather centered in the page itself... does that make sense?

also just a second question is whats the code to have a link pop up to a new window... that IS in fact sized in a certain way... like if I wanted to link to a video but i wanted that window to pop up and be resized already to fit the aesthetic purposes I want it to.

Thanks for the help!!

david

pretender
09-29-2009, 06:03 AM
You could try using tables to put your page in. as for pop up windows i would suggest you don 't use them because most browsers have popup blockers enable by default and most people wont enable popups for most sites, I know i don't :)

iGeek
09-30-2009, 04:31 AM
Tables are for tabular data, not for layouts. To get the centered "container" you would do something like:

<style type="text/css">

body
{
margin: 0;
padding: 0;
}

#container
{
width: 800px;
margin: 0px auto /* shorthand to center */
}

</style>


<div id="container">
<p>This is inside the centered container</p>
</div>


As for popup windows, I highly suggest you steer clear of them unless absoultely neccesary, in which case I'd suggest a JavaScript framework such as Boxy (http://onehackoranother.com/projects/jquery/boxy/) (with jQuery).