Jump to content


Photo

padding on sides of span with underline


  • Please log in to reply
1 reply to this topic

#1 Sumpson

Sumpson

    Young Padawan

  • Members
  • Pip
  • 32 posts
  • Gender:Male

Posted 21 February 2011 - 06:39 PM

Hello everyone,

I was having a problem and the pixel2life.com website came up, hoping someone will be able to help.
It's just a little html/css issue but I would like to know how to fix it the proper way. this is what I have:

<a title="-" href="#"><span>Home</span></a>

a{
text-decoration:underline;
}
span{
padding:10px 0;
}

this way I would like to have the underline continue 10px on the left and 10px on the right, it does work on FF and Safari for example but does not work with IE. Does anyone have a better solution besides adding
&nbsp;
on both sides?

Hope to hear some input.

ps. you can view an example of what i'm trying to accomplish at www.dezinkspecialist.nl

Edited by Sumpson, 21 February 2011 - 06:40 PM.


#2 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 22 February 2011 - 08:08 PM

1. Remove the span
2.
a {
    border-bottom: 1px solid #FFFFFF; /* <-- font color goes here */
    padding: 0 10px;
}

p.s. Are you sure that works in FF, the shorthand on the padding is backwards?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users