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![]()
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![]()
The simplest way is to add...
<center>
**page code**
</center>
....at either end of the html doc
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:
CSS:HTML Code:<div id="wrapper"> The rest of your site code goes in here. </div>
Code:#wrapper { width: 780px; margin: 0 auto; }