Re: Passing Validation

Discussion in 'HTML' started by Mohawk Mawk, May 23, 2007.

  1. Mohawk Mawk

    Mohawk Mawk Guest

    i am very sorry, that I put the old version of the site up, i thought
    it a bit stupid to put up wrong pages just to prove a point.
    one more try:
    I'm trying to pass the W3C validation, but theres a little problem
    Site to validate: http://bjorntoday.com/?page=Any&lang=E
    Validation message:
    http://validator.w3.org/check?uri=h...charset=(detect automatically)&doctype=Inline
    OK all 7 errors are of the same nature
    The cause for this message is that I have attempted to put a block-
    level element (<div>) inside an inline element(<a>)
    I do this is because I want the surface around the text to be
    clickable, as is the case right now. check out the buttons under the
    banner.
    HTML
    <td><a href="?page=Gallery&amp;lang=E"><div class="link">Picture
    Archive</div></a></td>
    CSS
    ..link{width:100%;height:100%;}

    Now I have tried alternatives:
    alternate test page: http://bjorntoday.com/try.html
    1) Try to style the a tag
    <td><a href="?page=Home&amp;lang=E" class="link">Picture Blog</a></td>
    ok for the validator, but as you will see only the text is clickable,
    surface around it does not respond. not the result I want
    2) Replace block element div with inline element span
    <td><a href="?page=Gallery&amp;lang=E"><span class="link">Picture
    Archive</span></a></td>
    same problem, I think it is the nature of inline elements just to
    affect the area immediately around the text

    I do not want to have to compromise the fact that the surface around
    the link is clickable, what would be an alternative method?
     
    Mohawk Mawk, May 23, 2007
    #1
    1. Advertising

  2. Mohawk Mawk

    Bergamot Guest

    Mohawk Mawk wrote:
    >
    > I have attempted to put a block-
    > level element (<div>) inside an inline element(<a>)
    > I do this is because I want the surface around the text to be
    > clickable


    You don't need extra div's to do this.

    a {display:block}

    --
    Berg
     
    Bergamot, May 23, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Mackay
    Replies:
    0
    Views:
    2,695
    Colin Mackay
    Jun 25, 2003
  2. Libs
    Replies:
    0
    Views:
    1,498
  3. Colin Basterfield

    Web form validation vs object validation

    Colin Basterfield, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    429
    Tommy
    Nov 29, 2003
  4. Matt
    Replies:
    14
    Views:
    4,108
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  5. Lucas Tam
    Replies:
    2
    Views:
    1,115
    Lucas Tam
    Feb 26, 2004
Loading...

Share This Page