SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    418
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    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.

    http://www.stoutstandards.com/Link.html

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,168
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    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.

    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.

    Code:
    <h1><a href="http://danhughes.libsyn.com/"><center><font color="black">Dan Hughes on Metal Detecting</center></a>
    <h1><a href="http://www.refugeearth.org/BoydZoo/career/CarsonEnt/CarsonEnterprises.html">Glenn Carson Enterprises</center></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:

    Code:
    p {text-align: center}
    Much nicer!

    And you can also add a color

    Code:
    p {text-align: center; color: black;}
    A lot nicer than all that redundant and outdated <font> stuff, I'm sure you will agree.

  3. #3
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    418
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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...

  4. #4
    SitePoint Addict AtSea webdesign's Avatar
    Join Date
    May 2010
    Location
    Newark, Delaware
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

    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.

  5. #5
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    418
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks, appreciate your kind words and for taking the time to respond....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •