|
|
#1 | ||
|
Senior Member
|
A client has asked for advice on how to get his webpage centered. I only have basic knowledge of coding so if possible coudl so coders advise on how he can get it in the center of the page.
Intruder Alarms - Home Thanks Curtis |
||
|
|
|
|
|
#3 | ||
|
Member
Join Date: Feb 2009
Location: Leicester
Posts: 39
Thanks: 0
Thanked 9 Times in 7 Posts
|
Really you need to be doing it with CSS not using <center> tags. <center> tags are deprecated, meaning they aren't in the the HTML standard anymore. Browsers still render them properly but there is no guarantee they will forever.
A better way to centre the page is to use margins. If you put a <div> around everything you want to centre, give it an id of wrapper and then style it in your css. Example: HTML: HTML Code:
<div id="wrapper"> The rest of your site code goes in here. </div> Code:
#wrapper {
width: 780px;
margin: 0 auto;
}
|
||
|
|
|
|
|
#4 | |||
|
Senior Member
Join Date: Feb 2010
Location: Wales, UK
Posts: 146
Thanks: 6
Thanked 13 Times in 11 Posts
|
Quote:
Your way is obviously much better |
|||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|