Centreing A Web Page?

Hi guys, Im rather new to website design and I appeared to be just wondering how I’d go about Centreing my website Because at the moment it sits with the very left of the page and seems to be rather bad when it can that, I need it centred like that for example:
www. clan-thr. com

Thanks beforehand.
-Dan

Initially welcome to WDF. Add this code in your CSS file:

Code:
body
text-align: core;
margin: 0 crash;

Thanks a whole lot man! This proved helpful really well! Your website looks good now
Thanks
-Dan

Embarresing, although whats the CSS record

A cascading down style sheet. It is an external file with a. css extension that is definitely called by the webpage that types the webpage. http: //www. w3. org/Style/CSS/

A small adjustment + justification…

The particular minicodetext-align: center/minicode is just not necessary. Doing this may make all the text around the html page based unless otherwise chosen.

When you use two values in CSS, it is for positioning, the best one is for that second one is perfect for. So by adding minicodemargin: 0 crash; /minicode you’re saying start with the top, and core horizontally. This will apply at background-position as nicely!

Not really. It is important in certain old versions of IE that don’t handle minicodemargin: 0 crash; /minicode correctly.

Thanks for all the post s folks, this has also been really helpful.

i make use of a wrapper, and it’s a trick i learned a bit ago, i can not remember from where. i just understand that just making teh system tag center everything doesn’t work correctly on most of browsers. like IE is effective but Firefox doesn’t, or vice versa

anyhow, the point was for getting the top a lot of element to center things, and the entire body tag is even now considered by windows ‘inside’ the HTML DOCUMENT tag. and identical problem happens using the margin: 0px crash;

one works in a single browser, the some other doesn’t

so i repeat this for fixed layouts

Code:
/* shelving units everything */
html document, body
text-align: core;


#wrapper
width: 770px /* or whatever width you'll need */
text-align: quit;
margin: 0px crash;

and water layouts, the same but as opposed to " auto" something similar to " 10%" or so to keep a little perimeter still.

Code:
/* shelving units everything */
html document, body
text-align: core;


#wrapper
text-align: quit;
margin: 0px 10%;

this includes never failed me, and seems to work in every browser

My reasonably cheap way (dunno whenever it validates any more, maybe in Transitional) has been to just enclose the entire page in your div, like the following: minicode< div align=’center’> *content*< /div> /minicode. You will need to make sure people align any text for the left though seeing that everything’s centred.

The particular align attribute is not going to work; you prefer to use the CSS house minicodetext-align: center; /minicode.

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *