Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make my page appear in the centre of my browser 1

Status
Not open for further replies.

markys98

Technical User
Sep 20, 2007
2
GB
Hello
I am new to dreamweaver version 8, can anyone tell me how i make my web page appear in the centre of my browser all the time, rather than allowing it to resize and fill the whole browser, when minimising.
Thanks
Mark
 
Depends on how you have your site set up. but you can wrap a DIV around it, and give it a size that can contain your site, and then give it auto margins so it automatically centers regardless of resolution

Code:
#centerbox{
text-align:center;
width:800px;
border: 1px solid red;
margin-left:auto;
margin-right:auto;
}

and in your main code:
Code:
<body>
<div id="centerbox">
[blue]Site code goes in here[/blue]
</div>
...


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
put the entire page in a frame, and set the frame width to 100%.
It works for me.

Dick

|========================|
Lots of people call me MrFixit.
Right now I feel like MrJinxit.
|========================|
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top