Not only the selected HREF gets surrounded, but the whole row gets surrounded

Discussion in 'HTML' started by Stefan Mueller, Jul 8, 2006.

  1. Because in Internet Explorer I always have a small space after a HREF I use
    'style = "display:block"'
    <a href = "mailto:" style = "display:block"></a>
    That works fine.

    However if I select the HREF with the Tab key not only '' gets
    surrounded. The whole line gets surrounded.

    Here an example:
    <table width = "100%">
    <tr>
    <td align = "center">
    <a href = "mailto:" style =
    "display:block"></a>
    </td>
    </tr>
    </table>

    If I don't use 'style = "display:block"' only '' gets
    surrounded. That's what I'd like to have.

    Is it possible to avoid the space after a HREF so that still only
    '' gets surrounded if it gets seleced by the Tab key?
    Stefan
     
    Stefan Mueller, Jul 8, 2006
    #1
    1. Advertising

  2. Re: Not only the selected HREF gets surrounded, but the whole rowgets surrounded

    Stefan Mueller wrote:
    > Because in Internet Explorer I always have a small space after a HREF I use
    > 'style = "display:block"'
    > <a href = "mailto:" style = "display:block"></a>
    > That works fine.
    >
    > However if I select the HREF with the Tab key not only '' gets
    > surrounded. The whole line gets surrounded.
    >


    The 'small space' your see is the whitespace in your markup. Browsers
    are supposed to ignore but IE doesn't to fix put the closing TD tag
    immediately after the closing A tag

    <table>
    <tr>
    <td><a href="somewhere.html">To Somewhere</a></td>
    </tr>
    </table>


    > Here an example:
    > <table width = "100%">

    ^^^^^^^^^^^^^^
    put in your stylesheet not your markup
    > <tr>
    > <td align = "center">

    ^^^^^^^^^^^^^^^
    put in your stylesheet not your markup
    > <a href = "mailto:" style =
    > "display:block"></a>
    > </td>
    > </tr>
    > </table>
    >
    > If I don't use 'style = "display:block"' only '' gets
    > surrounded. That's what I'd like to have.
    >
    > Is it possible to avoid the space after a HREF so that still only
    > '' gets surrounded if it gets seleced by the Tab key?




    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jul 8, 2006
    #2
    1. Advertising

  3. Stefan Mueller

    Rik Guest

    Stefan Mueller wrote:
    > Because in Internet Explorer I always have a small space after a HREF
    > I use 'style = "display:block"'
    > <a href = "mailto:" style =
    > "display:block"></a> That works fine.


    What do you mean by "small space"?
    Making it a block hardly seems the answer. What is it exactly you're trying
    to do? If you're only interested in some space after the link, why not use
    margins or padding? That's what they're for.

    > However if I select the HREF with the Tab key not only
    > '' gets surrounded. The whole line gets surrounded.


    Yep, making it a block will do that. The <a> takes up the whole line.

    Grtz,
    --
    Rik Wasmus
     
    Rik, Jul 8, 2006
    #3
  4. On Sat, 8 Jul 2006 14:07:43 +0200, "Stefan Mueller"
    <> wrote:

    > Here an example:
    > <table width = "100%">
    > <tr>
    > <td align = "center">
    > <a href = "mailto:" style =
    > "display:block"></a>
    > </td>
    > </tr>
    > </table>


    Can you try :

    <td align = "center"
    ><a href = "mailto:"
    ></a
    ></td>


    --
    Steven
     
    Steven Saunderson, Jul 8, 2006
    #4
  5. Many thanks to all.
    To write everything on one line really solves my problem.

    Stefan
     
    Stefan Mueller, Jul 10, 2006
    #5
  6. On Mon, 10 Jul 2006 13:18:04 +0200, "Stefan Mueller"
    <> wrote:

    > Many thanks to all.
    > To write everything on one line really solves my problem.


    Yes, one line can help but the important thing is to avoid white space
    between > and <. This is why I put > on the following line immediately
    before the next <. I hated this formatting at first but now it seems
    fine in cases when it produces a better result.

    --
    Steven
     
    Steven Saunderson, Jul 10, 2006
    #6
    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. \A_Michigan_User\
    Replies:
    2
    Views:
    903
    \A_Michigan_User\
    Aug 21, 2006
  2. news.microsoft.com

    Underline a whole row for a particular row

    news.microsoft.com, Mar 4, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    5
    Views:
    207
    Eliyahu Goldin
    Mar 6, 2005
  3. D
    Replies:
    0
    Views:
    221
  4. Selected Row Only GridView Row Visible?

    , Oct 17, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    298
  5. libsfan01
    Replies:
    5
    Views:
    246
    Jeff North
    Dec 20, 2006
Loading...

Share This Page