<center> Tags

Discussion in 'HTML & Website Design' started by BlueEew, Jul 28, 2008.

  1. #1
    Center tags are not valid code in xHTML. However I want to center some links in the page but not the whole page. How would I be able to do this?
     
    BlueEew, Jul 28, 2008 IP
  2. dr.gonzo

    dr.gonzo Peon

    Messages:
    32
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try using <div> instead of <center> tags.
    Just replace any <center> tags. Your code should look like this:
    <div style="text-align: center;">"put your content here" </div>

    Hope this helps mate. Let me know if any more help is needed!
     
    dr.gonzo, Jul 28, 2008 IP
  3. BlueEew

    BlueEew Well-Known Member

    Messages:
    2,434
    Likes Received:
    79
    Best Answers:
    1
    Trophy Points:
    150
    #3
    I have done that. However I now get this error:

    You can find it there.
     
    BlueEew, Jul 28, 2008 IP
  4. dr.gonzo

    dr.gonzo Peon

    Messages:
    32
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Cant see it there... Can you point it out? There seem to be 8 errors on the page, none of them seem to be related to the align command...
     
    dr.gonzo, Jul 28, 2008 IP
  5. BlueEew

    BlueEew Well-Known Member

    Messages:
    2,434
    Likes Received:
    79
    Best Answers:
    1
    Trophy Points:
    150
    #5
    Never mind. I got it done. :)
     
    BlueEew, Jul 28, 2008 IP
  6. dr.gonzo

    dr.gonzo Peon

    Messages:
    32
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Sorry for the delay mate. Had to do some stuff...
    Thats quite easy to solve. xHTML doesnt allow css declarations inside the <body> of a file.
    So you have to define the css-markup separately in the <head>.
    For your case just add

    <style type="text/css">
    #align {
    text-align: center;
    }
    </style>

    into the <head></head> section.

    and change

    <div style="text-align: center;"><a href="/history/intro/">PokeProject Inspiration</a> | <a href="/history/forums/">Forums History</a> | <a href="/history/websites/">Websites History</a></div></p> to

    <div id="align"><a href="/history/intro/">PokeProject Inspiration</a> | <a href="/history/forums/">Forums History</a> | <a href="/history/websites/">Websites History</a></div></p>

    [EDIT]
    Oh I see, you sorted it out already! Cool! Good luck with your site!
    [/EDIT]
     
    dr.gonzo, Jul 28, 2008 IP
  7. BlueEew

    BlueEew Well-Known Member

    Messages:
    2,434
    Likes Received:
    79
    Best Answers:
    1
    Trophy Points:
    150
    #7
    I am now just looking how to do the following:

    We're. The bolded symbol.

    And how to "Quote"?
     
    BlueEew, Jul 28, 2008 IP
  8. dr.gonzo

    dr.gonzo Peon

    Messages:
    32
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You mean how to insert symbols? If I understand you right then this might be of help.
    Cant provide a life link... lol

    You just need to insert something called character references instead of the actual symbol. Just research it on google.

    &apos; = apostrophe
    &quot; = quote
    &lt; = >
    &gt; = <

    if i remember right
     
    dr.gonzo, Jul 28, 2008 IP
    BlueEew likes this.
  9. BlueEew

    BlueEew Well-Known Member

    Messages:
    2,434
    Likes Received:
    79
    Best Answers:
    1
    Trophy Points:
    150
    #9
    Thanks for that. :D

    Rep added.
     
    BlueEew, Jul 28, 2008 IP
  10. dr.gonzo

    dr.gonzo Peon

    Messages:
    32
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Glad that I could help!
    Cheers for the rep!
    *goes to bed*
     
    dr.gonzo, Jul 28, 2008 IP