Help for a Client

CYoung

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 :icon_smile:
 
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:
<div id="wrapper">
  The rest of your site code goes in here.
</div>

CSS:
Code:
#wrapper {
  width: 780px;
  margin: 0 auto;
}
 
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.

I understand that they are deprecated but it still remains the easiest way to center an entire site for the time being.

Your way is obviously much better :icon_thumbup:
 
Back
Top