This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > October 2005 > Vertical Centre





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Vertical Centre
7073

2005-10-31, 6:29 pm

Hi Everyone

New to dreamweaver & my first ever post.

How do I go about centre aligning my table on the Vertical axis?

Thanks.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<table width="750" height="400" border="0" align="center" bgcolor="#663366">
<tr>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>


Alper Bulu?

2005-10-31, 6:29 pm

Add a table with single column and row. Set height attribute of the table to
"100%" and vertical align attribute of the table cell to "middle". After that
put the table that you post above into it.

Use "Commands>Add/Remove Netscape Resize Fix".

Remove Document Type Definition (its the line that starts with !DOCTYPE)
That's All.

7073

2005-10-31, 6:29 pm

Alper


It works great with a table at 100% but if i reduce this to 50% it does not
place the table on a vertical centre.

Thanks


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<table width="750" height="400" border="0" align="center" bgcolor="#663366">
<table width="100%" height="100%" align="center">
<tr>
<td bgcolor="#99CCCC">&nbsp;</td>
</tr>
</table>
</body>
</html>


Alper Bulu?

2005-10-31, 6:29 pm

You should do it like this. :)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<table cellpadding="0" cellspacing="0" width="100%" height="100%" border="0">
<tr><td valign="middle">
<table width="750" height="400" border="0" align="center" bgcolor="#663366">
<tr>
<td bgcolor="#99CCCC">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

7073

2005-10-31, 6:29 pm

Alpher

Thank you very much, but I got 2 more questions..

1) How can I round the corners of my table?
2) I am using a 20" Apple display and have no scroll bars, will I get scroll
bars when viewing
this on say a 15" screen?

Regards

Alper Bulu?

2005-10-31, 6:29 pm

1.Use graphics :) You can manage it with fireworks. Do some googling :)
2.It's depends on your content. If you can keep the inner table' height which
is 400 now, no scrollbars will be displayed even 800x600 res. Due to I own 19"
lacie electronblue, I cannot see any scrollbars around :)

Good Luck.

.: Nadia :. *TMM*

2005-10-31, 10:23 pm

"7073" <webforumsuser@macromedia.com> wrote in message
news:dk61b0$154$1@forums.macromedia.com...
> Hi Everyone
> New to dreamweaver & my first ever post.
> How do I go about centre aligning my table on the Vertical axis?


Example on the best way to do this is here:
http://www.dreamweaverresources.com...s/centering.htm


--
Nadia
Team MM Volunteer for Dreamweaver
--------------------------------------------
http://www.csstemplates.com.au
Templates|CSS Templates|
Dropdown Menu Designs | SEO Articles |Tutorials
http://www.DreamweaverResources.com
---------------------------------------------
Search this forum:
http://tinyurl.com/2rfa2
---------------------------------------------



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews