Need help validating XHTML

Discussion in 'HTML & Website Design' started by JinRoh, Aug 19, 2007.

  1. #1
    Hello, I need help validating XHTMl, just one thing.

    The URL is www.CHETOS.es , and as you can see here:

    http://validator.w3.org/check?uri=h...(detect+automatically)&doctype=Inline&group=0

    It's not valid XHTML 1.0 Transitional.

    I have the problem here:

    <div id="paginator">
    <ul class="active"><li>1</li></ul>
    <a href="/css/page/2/" title="P&aacute;gina 2"><ul><li>2</li></ul></a>
    <a href="/css/page/3/" title="P&aacute;gina 3"><ul><li>3</li></ul></a>
    <a href="/css/page/4/" title="P&aacute;gina 4"><ul><li>4</li></ul></a>
    <a href="/css/page/5/" title="P&aacute;gina 5"><ul><li>5</li></ul></a>
    </div>


    XHTML can't have ul or li (I guess) inside <a>.

    Is there any way to fix this? An alternate way to do it?

    Thanks in advance.
     
    JinRoh, Aug 19, 2007 IP
  2. guerilla

    guerilla Notable Member

    Messages:
    9,066
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    200
    #2
    For starters, this
    <a href="/css/page/2/" title="P&aacute;gina 2"><ul><li>2</li></ul></a>

    Should read like this

    <ul><li><a href="/css/page/2/" title="P&aacute;gina 2">2</a></li></ul>
    Code (markup):
    Instead of making each # a list, you should look at making all 5 numbers one list, running horizontally, like
    UL Class = makes menu horizontal

    LI Class = active or not
     
    guerilla, Aug 19, 2007 IP
  3. webdesignerindia

    webdesignerindia Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Always remember that whenever you want to build web page....refer HTML tags and their placement. So that you will suffer !!






    regards,
     
    webdesignerindia, Aug 19, 2007 IP
  4. JinRoh

    JinRoh Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hello and sorry for answering so late.

    Guerrilla, thanks for your advices, but If I use

    <ul><li><a href="/css/page/2/" title="P&aacute;gina 2">2</a></li></ul>

    instead of

    <a href="/css/page/2/" title="P&aacute;gina 2"><ul><li>2</li></ul></a>

    Users have to click exactly in the Number to follow the link, and with the second code, you can click in the "number block" (which is 15px width) so you don't have to click "exactly" in the number. Is there any way to do it like that with the first code??.



    With the code you gave me, <div>
    <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
    </ul>
    </div>

    What's the class to make the UL horizontal?

    Thanks
     
    JinRoh, Sep 3, 2007 IP
  5. VimF

    VimF Well-Known Member

    Messages:
    307
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    118
    #5
    
    <ul id="paginator">
    	<li class="active">1</li>
    	<li><a href="/css/page/2/" title="P&aacute;gina 2">2</a></li>
    	<li><a href="/css/page/3/" title="P&aacute;gina 3">3</a></li>
    	<li><a href="/css/page/4/" title="P&aacute;gina 4">4</a></li>
    	<li><a href="/css/page/5/" title="P&aacute;gina 5">5</a></li>
    </ul>
    
    Code (markup):
    
    #paginator li a {
    	display: block;
    	width: 15px;
    }
    
    Code (markup):
    Hope that helps.
     
    VimF, Sep 3, 2007 IP