Log in

View Full Version : Border / Table



T-B0N3
04-27-2006, 12:09 PM
Hey, I know this is a really stupid question but my html/css skills are so rusty that you might say they're invisible. How can I put the whole page I did, really simple one, in a table .. ? Or to put it another way ... how can I put a border around the whole page ?

NXArmada
04-27-2006, 02:48 PM
table {
border: thin;
border-color: Blue;
}


This code well make all tables have a thin blue border. You can change the word table to make other things have a Blue Border.

Say you have

<div id="wrapper">Content Here</div>
And you want it to place a blue border around your content take the same CSS i placed above and change it to this:


#wrapper {
border: thin;
border-color: Blue;
}

And that will place a blue border around all your conent that is inside the DIV tags.

Twey
04-27-2006, 02:51 PM
May I suggest, however, that you use a DIV with the above CSS applied, rather than a table. Tables slow down page loading time.

mwinter
04-27-2006, 03:00 PM
Or to put it another way ... how can I put a border around the whole page ?First, wrap the content in a container (a div element will do) and give it an id attribute value like 'container' or 'wrapper'. It's then a matter of styling it as you see fit.

For example,



#wrapper {
background: #ffffff;
color: #000000;
margin: 1em;
border: 2px solid #000000;
padding: 0.5em;
}


<div id="wrapper">
<!-- ... -->
</div>
will create a region with a white background and a moderately thick, solid black border. The margin will keep the border away from the edge of the viewport (assuming the wrapper is a child of the body element), and the padding will keep the contents away from the border.

Hope that helps,
Mike

T-B0N3
04-28-2006, 07:32 AM
Thanks a lot guys ... that was what I was looking for.

T-B0N3
05-03-2006, 02:16 PM
Me again ... I'm not opening a new thread as the matter is not worth it.

There goes. I have index.html which let's say points to a.html - a.html has it's own sublinks b c and d.html. I want that once you click a.html link on the index, the a window to be automaticly resized to ... 400 by 400 let's say. After the user has chosen wether to go to b c or d, and he clicks the aferent link I want the window size to go back to normal, as b c and d are normal webpages. Therefore I only want a.html to be of a certain size, the rest... normal. Oh and ... I want to keep it in the same window no target=blank. Possible ?
Thanks ahead.

Twey
05-03-2006, 02:52 PM
You can try window.resizeTo(400, 400), but a lot of browsers will block it as a security measure.

T-B0N3
05-04-2006, 07:03 AM
Ok ... I shall try and see what comes out of it. Cheers.