HighDots Forums  

Centering web site

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Centering web site in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ghi572000
 
Posts: n/a

Default Centering web site - 12-02-2006 , 05:00 PM






I have been doing research on centering web sites when being viewed on
different screen sizes.

So far I found that adding <centre>after the <body> and </centre> before
</body> should centre the web page?

or using
<body><table width="100%" height="100% border=0 cellpadding=0
cellspacing=0><tr><td>

web content

</td></tr></table></body>

I have tried both and neither have worked.

What I now have done is created a new simple web page so I can try different
ways as followed :

<body>
<table width="215">
<tr>
<td align="center">
<table width="171">
<tr>
<td>

<div id="Layer1" align="center" class="style1">gary</div>

</td>
</tr>
</table>
</td>
</tr>
</table>

</body>
</html>

This does not work either?

Any ideas on a way to do this would be appreciated.



Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: Centering web site - 12-02-2006 , 06:11 PM






Quote:
I have been doing research on centering web sites when being viewed on
different screen sizes.
It's not screens you need to worry about. It's different sized browser
viewports.

Quote:
So far I found that adding <centre>after the <body> and </centre> before
/body> should centre the web page?
No. The deprecated tag would be <center>, but it's not the best.

Quote:
or using
body><table width="100%" height="100% border=0 cellpadding=0
cellspacing=0><tr><td
Not only is this invalid, it has nothing to do with centering.

If you want to center the page, place it all into an outer table, select the
table in DW, and use the Property inspector to set the alignment to
"center".

Quote:
I have tried both and neither have worked.
Yes - I have told you why that is the case. Neither method was proper HTML,
and the latter method has no 'center' sense to it.

Quote:
This does not work either?
If you are using layers, then you need to read this page -

http://www.great-web-sights.com/g_layerlaws.asp

Quote:
Any ideas on a way to do this would be appreciated.
Come back after you have read the page and we'll continue the discussion!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"ghi572000" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I have been doing research on centering web sites when being viewed on
different screen sizes.

So far I found that adding <centre>after the <body> and </centre> before
/body> should centre the web page?

or using
body><table width="100%" height="100% border=0 cellpadding=0
cellspacing=0><tr><td

web content

/td></tr></table></body

I have tried both and neither have worked.

What I now have done is created a new simple web page so I can try
different
ways as followed :

body
table width="215"
tr
td align="center"
table width="171"
tr
td

div id="Layer1" align="center" class="style1">gary</div

/td
/tr
/table
/td
/tr
/table

/body
/html

This does not work either?

Any ideas on a way to do this would be appreciated.





Reply With Quote
  #3  
Old   
the9Ulaire
 
Posts: n/a

Default Re: Centering web site - 12-03-2006 , 02:34 AM



I do know that you can create a table, tell it to have 100% width, have three
columns, and define the middle one's width, and the page will center itself.

Though, I doubt that it is the best way--listen to Murray, he's the genius
around here.


Reply With Quote
  #4  
Old   
the9Ulaire
 
Posts: n/a

Default Re: Centering web site - 12-03-2006 , 02:35 AM



That is, if your content is in the middle column^^

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.