How can I center my WEB

NamecheapNamecheap
Watch
Impact
0
I am working with Dreamweaver, I want my page apears in te center
(horinzontally talking) depending on the size of the explorer window.
My page goes to the left side of the window by default.

How can I do that?

Thanks,

Miguel
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
One simple way is to insert this code:
Code:
<p align="center">

web site content here

</p>
 
0
•••
<center>

Centered text

</center>
 
0
•••
Both of the examples above are invalid for HTML 4.01 and above, the correct way is to use:

style="margin:0 auto" on whatever the container is. If it's on a block element (ie, <p> or <div>) then the block needs to have a certain width or it won't appear to work. You could also use style="text-align:center" on the containing block.
 
0
•••
Thanks, worked fine except for the web background image .. any suggestions?
 
0
•••
right click, page properties, then it should say background image and u just browse to the file.
 
0
•••
Rowan W said:
Both of the examples above are invalid for HTML 4.01 and above
Rowan, how is it inavlid? Using styles are preffered by some, and regular HTML by others. Both methods are valid.
 
0
•••
I believe <CENTER> tags are outdated in preferance of <DIV align="center">

Not sure if its not compliant anymore, but they both do the same thing.
 
0
•••
Gene said:
Rowan, how is it inavlid? Using styles are preffered by some, and regular HTML by others. Both methods are valid.

Well, maybe the word 'invalid' was a bit heavy, however the 'align' attribute has been deprecated since HTML4.01.

See "deprecated": http://www.w3.org/TR/REC-html40/present/graphics.html#h-15.1.2

You can still use 'align', but we are recommended not to.
 
0
•••
If ur site is going left in dreamweaver then its not big problem coz once u see it in browser then it will show ok but if it is even showing in left in broweser too then click on the page properties in properties panel and select halign = center, besides that if u are using tables in ur web page then align center the master table of ur page under which all the content lies
 
0
•••
He is using dw, what makes you think it will validate anyways? I am more of a CSS fan myself. The coding is much easier and smaller.
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer

We're social

Spaceship
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back