PDA

View Full Version : Vertical Table Positioning


jon015
08-17-2008, 02:12 PM
I'm a newbie to dreamweaver using tables. How do I align my table vertically, I want to create an effect similar to this one www.sandersonweatherall.com, where the top of my border is set at the top but the bottom of the square is still visible. I have center aligned, but cannot see a vertical alignment?

Chapo
08-18-2008, 12:17 AM
Actually its a DIV and inside of it you have a table. With a DIV you can align to the center and then position it to the top. And just some CSS to the margins to AUTO so it wil remain centered.

Ricky55
08-18-2008, 10:20 AM
Like chapo said use a Div container not a table. For example:

CSS Code (place before the close of the head tag </head>

<style type="text/css">

body {
margin: 0;
padding: 0;
}

#wrapper {
width: 800px;
height: 600px;
margin: 0 auto;
background: red;
text-align: center;
}

</style>


HTML place between <body> Tags </body>

<div id="wrapper">Some Content</div>


You need to do some tuts.

jon015
08-18-2008, 10:35 AM
Like chapo said use a Div container not a table. For example:

CSS Code (place before the close of the head tag </head>

<style type="text/css">

body {
margin: 0;
padding: 0;
}

#wrapper {
width: 800px;
height: 600px;
margin: 0 auto;
background: red;
text-align: center;
}

</style>


HTML place between <body> Tags </body>

<div id="wrapper">Some Content</div>


You need to do some tuts.


Ok thanks, I'm really new to this and have not applied code yet in dreamweaver. I have managed to wrap my table in a div tag and it has not affected my layout, not sure what to do now, is code the only way?

Ricky55
08-18-2008, 12:23 PM
As a quick fix, if you just want to centre the table horizontally, remove the Div, select the table click the align drop menu and select centre.

To control its psotion vertically add this code

<style type="text/css">

body {
margin-top: 0;
}
</style>