Center Alignment

Okay, this should be an easy one, but one I cannot see or fix. The following is a page from my site that has links centered on the page. Under General Treasure Hunting the centering takes a detour. I have looked and looked at it, and simply cannot figure out where it went wrong. It was fine until I added a site at the end.

I feel a little sorry for you posting this question, as you are in danger of some pretty harsh comments from HTML/CSS purists! But I think you know to expect that. :slight_smile:

In other words, that’s not great coding. Anyhow, you’ll notice at a certain point that you go from having an opening and closing <center> element to only having a closing one.

<h1><a href="http://danhughes.libsyn.com/">[COLOR="Red"]<center>[/COLOR]<font color="black">Dan Hughes on Metal Detecting[COLOR="Red"]</center>[/COLOR]</a>
<h1><a href="http://www.refugeearth.org/BoydZoo/career/CarsonEnt/CarsonEnterprises.html">Glenn Carson Enterprises[COLOR="Red"]</center>[/COLOR]</a>

Adding in the missing opening <center> tags may help (I’m not sure, though).

However … here are a few pointers:

  • only use one H1 per page, so perhaps use H2s if you want to stick with headings, or ideally, use <p>s that are styled to suit.
  • instead of all that <center> stuff, just use one simple CSS rule:
p {text-align: center}

Much nicer!

And you can also add a color

p {text-align: center; color: black;}

A lot nicer than all that redundant and outdated <font> stuff, I’m sure you will agree. :slight_smile:

Ralph, thank you. Was looking for my problem where the centering stopped, not above. Not sure if it’s my old age or stupidty…

I do understand your remarks about using <p> and the one indication of centering. Will be making that change within a day or so. I am somewhere in-between having fun with a website, and actually learning to do it right. Believe it or not I do learn something new each time I visit here (despite
the bashing).

Appreciate you all…

Barnum, don’t sweat it and take the bashing as people with no relations type skills.

Take this as a complement. For someone your age to be doing web design and the willingness to learn and improve is enough for me to tip my hat to you. :slight_smile:

AFAIC if you take the time to improve on your processes there is no need for bashing. A lot of us with decades of experience could bash all of the newbies here. But we choose to educate rather than offer nothing at all. :slight_smile:

Thanks, appreciate your kind words and for taking the time to respond…