SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,531
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Space getting Hyperlink Underline

    In this code, the space between my icon and the word "Edit" is getting a hyperlink underline, which is annoying me?!

    PHP Code:
        if ($editablePost){
                
    $editLink "<a id='editComment' href='/articles/edit_comment.php?comment=" 
                            
    $commentID "&member=" $memberID "'>
                            <img src='/images/Edit_16x16.png' width='16' 
                                    alt='Edit Comment' title='Edit Comment'/>&nbsp;Edit
                        </a>"
    ;
        }else{ 

    I thought adding the &nbsp; would solve my problem, but alas, no luck?!


    Debbie

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    Argh! When are you going to learn not to post PHP in the HTML forum?

    Just remove the underline from the <a> and wrap a span around the text and make the underline show on the span only.

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,531
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Argh! When are you going to learn not to post PHP in the HTML forum?
    Ralph!!!!!

    I'm not asking for help on PHP, and I don't think what I posted above will bring the HTML Forum to a grinding halt?!


    Just remove the underline from the <a> and wrap a span around the text and make the underline show on the span only.
    Okay, that makes sense. (No wonder I have more Styles than Code?!)

    Thanks,


    Debbie

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    I'm not asking for help on PHP
    Exactly. So don't post it.

    This example was pretty simple, but any question about HTML/CSS shouldn't have PHP involved, as this is purely a "what you see in the browser" issue, and PHP is long gone by the time the page reaches the browser. Often it's impossible to know what HTML we are actually working with if the PHP is included. So in future, just view source in your browser and post what the browser sees.


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
  •