![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Oct 2009
Posts: 1
OS: winXP
|
Dreamweaver 4: How to center in browser
What's an easy way to have my page be centered on the monitor when viewing in the browser? I don't want to adjust the margins - but, I do want the page centered no matter what size monitor the user has.
Any thoughts? Thank you for any ideas! |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Registered User
Join Date: Oct 2009
Location: Plymouth, UK
Posts: 7
OS: windows vista business SP1
|
Re: Dreamweaver 4: How to center in browser
I suggest to wrap the site into a DIV:
<BODY> <DIV id='site_cont' style='margin: 0 auto;'> here goes the site content </DIV> </BODY> |
|
|
|
|
|
#3 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,865
OS: Vista, various linux distros
|
Re: Dreamweaver 4: How to center in browser
esso illuded to the fix there. Rather than using fixed margins you should use the "auto" value for the left and right margin... E.g:
Code:
<style type="text/css">
/*i'm using body as an example, you should use a div holder like esso said*/
BODY{
margin-left:auto;
margin-right:auto;
/*Also make sure that the div has a width attribute or you'll have problems with this*/
}
</style>
|
|
|
|
![]() |
| Thread Tools | |
|
|