SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    webdesign Percept's Avatar
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    397
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Underlines inside span

    Hi,

    I got a listmenu like this:
    • <a href="blablabla">link1span> link info</span></a>
    • <a href="blablabla">link2span> link info</span></a>
    • <a href="blablabla">link3span> link info</span></a>
    • ...
    everything inside an LI is 1 link but I added a span so I could style the link info a little different. The problem is, everything outside the span should be underlined but everything within the span should not but Firefox still adds the underline for the span-ned text. (IE works perfect, go figure)

    Code:
    ul li a span {
     color: #252525;
     text-decoration: none;
     }


  2. #2
    SitePoint Addict Ronny's Avatar
    Join Date
    Sep 2003
    Location
    Israel
    Posts
    334
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just add !important in the right place, it should do the job:
    Code:
    text-decoration: none !important;
    Check out my new vcard at RonnyO.com
    BlinkIP.com - The fastest way to your IP

  3. #3
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    background color on span
    display block (float span)
    place it outside the A tag ?

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>12345 12345 12345 12345 12345</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<style type="text/css">
    	
    	ul{width:80px;}
    	
    	ul li a span {
    	color:#252525;
    	text-decoration:none;
    	background:#ffffff;
    	}
    	
    	.x{float:right;}
    	ul li a:hover{background:#ffffff;}
    	ul li a:hover span {color:#ff6600;}
    	</style>
    </head>
    <body>
    
    <ul>
    <li><a href="x.htm">link1<span> link info</span></a></li>
    <li><a href="x.htm"><span class="x"> link info</span>link1</a></li>
    <li><a href="x.htm">link1</a><span> link info</span></li>
    </ul>
    
    </body>
    </html>


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
  •