Can't Remove Underlines from Links

Discussion in 'CSS' started by jhmattern, Oct 17, 2008.

Thread Status:
Not open for further replies.
  1. #1
    I know this is supposed to be a pretty easy thing, right? But I can't get my links at www.webwritersguide.com to remove the underlines in the stylesheet. Well, I'm removing it in the stylesheet (text-decoration: none;), but they simply won't go away! :(

    Maybe I'm missing something in there and I've just been staring at it too long to catch it, or maybe it's something else entirely. For the life of me I can't get it figured out. If anyone has any thoughts, I'd be extremely grateful to hear them. My stylesheet is below - primarily interested in removing the underline from the post title links and in-content links.

    Thanks!

    /*  
    Theme Name: Ads Theme
    Theme URI: http://www.blogging-secret.com/
    Description: Ads  Theme is 2 or 3 column ads style wordpress theme
    Version: 1.0
    Author: Eric
    Author URI: http://www.blogging-secret.com/
    */
    
    
    #wrap {
    	background: #FFFFFF;
    	width: 940px;
    	margin: 15px auto 15px;
    	padding: 15px;
    	border: double #C0C0C0;
    }
    
    body 
    {
    	margin: 0px;
    	padding: 0px;
    	font-family: Arial, Helvetica, sans-serif;
    	line-height: 20px;
    	font-size: 12px;
    	color: #000;
    	background: #BCBEB0;
    }
    
    a {
            text-decoration: none;
            color: #6699cc;
    }
    
    img {
    	border: 0;
    }
    
    a img {
    	border-bottom:none;
    	text-decoration:none;
    }
    
    /************************************************
    *	Header  									*
    ************************************************/		
    	
    #header {
    	width: 940px;
    	height: 100px;
    	background-color: #322E2B;
    	border-bottom: #4D4B49 1px solid;
    }
    
    #header .logo {
    	width: 440px;
    	height: 100px;
    	background-image: url(images/logo.gif);
    	background-repeat: no-repeat;
    	float: left;
    	cursor: pointer;
    }
    
    #header .ads {
    	width: 480px;
    	height: 80px;
    	float: right;
    	padding: 20px 0px 0px 0px;
    }
    
    
    /************************************************
    *	Nav  									*
    ************************************************/	
    	
    #nav{
    	background: #3A3A3A;
    	height: 32px;
    	padding: 4px 0 0;
    	margin-bottom:5px;
    }
    
    #nav-left {
    	float: left;
    	display: inline;
    	width: 580px;
    }
    	
    #nav-right {
    	float: right;
    	display: inline;
    	width: 300px;
    }
    	
    #nav ul {
    	position: relative;
        overflow: hidden;
    	padding-left:5px;
    	margin:0;
    	font: 1.2em Arial, Helvetica, sans-serif;
    }
    
    #nav ul li {
        float: left;
        list-style: none;
    }
    
    #nav ul li a, #nav ul li a:visited {
    	display: block;
    	color: #fff;
    	margin: 0 8px; 
    	padding: 5px 7px;
    	color:#fff;
            text-decoration:none;
    }
    
    #nav ul li a:hover {
    	color: #fff; 
    	background-color: #C4C5B8;
      	color: #fff;
    	margin: 0 8px; 
    	padding: 5px 7px;
            text-decoration:underline;
    } 
    
    #nav ul li a.current, #nav ul li a.current:visited, #nav ul li a.current:hover { 
    	margin: 0 8px; 
    	background-color: #A6A994;
      	color: #fff;
    	padding: 5px 7px;
    }
    
    /************************************************
    *	Search  									*
    ************************************************/	
    	
    #search{
    	background: #F7F7F7;
    	border: 1px solid #b3b3b3;
    	float: right;
    	height: 25px;
    	margin: 0 15px 0 0;
    	width: 280px;
    }
    * html #search{
    	margin-right: 8px;
    }
    #search input{
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	background: transparent;
    	border: 0;
    	color: #000;
    	float: left;
    	font-size: 13px;
    	margin: 4px 0 0;
    	padding: 0px 2px 2px 10px;
    	width:288px;
    }
    	
    /************************************************
    *	Contents  									*
    ************************************************/	
    
    #contentwrapper{
    	width: 940px;
    	background-image: url(images/sbbg.gif);
    }
    
    #contentwrappersales{
            width:940px;
            background: #ffffff;
    }
    
    #content {
    	float: left;
    	padding: 10px 10px 10px 10px;
    	width: 500px;
    	border: #E4E2D3 1px solid;
    }
    
    #contentsales {
    	float: left;
    	padding: 10px 10px 10px 10px;
    	width: 900px;
    	border: #E4E2D3 1px solid;
    }
    
    #content .adsense {
    	margin-bottom:20px;
    }
    
    .entry {
    	line-height:20px;
    }
    
    .entry a, .commentlist a, .navigation a {
    	color:#6699cc;
            text-decoration: none;
    	border-bottom: #222 solid 1px;
    }
    
    .entry a:hover, .commentlist a:hover, .navigation a:hover {
    	color:#6699cc;
            text-decoration:underline;
    }
    
    .entrytitle h2 {
    	margin: 0px;
    	font-weight: bold;
    	font-size: 24px;
    	line-height: 32px;
    	padding: 0px;
    	margin-bottom: 5px;
    	font-family: Georgia, "Times New Roman", Times, serif;
    }
    
    .entrytitle h2 a {
    	border-bottom: 1px solid #6699cc;
    	color: #3E3E3E;
            text-decoration: none;
    }
    
    .entrytitle h2 a:hover {
    	color: #ca1717;
    	border-bottom: 1px solid #6699cc;
            text-decoration: underline;
    }
    
    .entry .meta {
    	background-color: #dedfcc;
    	padding: 5px;
    	color: #111;
    	font-size: 12px;
    	line-height:20px;
    }
    
    .entry .meta a {
    	color: #000;
            text-decoration:none;
    }
    
    .entry .meta a:hover {
    	color: #ca1717;
    }
    
    .entrybody {
    	margin-top:15px;
    	margin-bottom:50px;
    }
    
    .entry blockquote {
    	color: #666;
    	margin: 0 30px 20px 30px;
    	padding: 0px 0px 0px 10px;
    	border: 2px solid #fff;
    	border-left: 1px solid #A4A1A1;
    }
    
    
    
    /************************************************
    *	Sidebar  									*
    ************************************************/
    	
    #sidebar {
    	float: right;
    	width: 393px;
    	padding: 10px;
    	background-color:#E4E2D3
    }
    
    #sidebar .box {
    	padding: 6px;
    	margin-bottom: 10px;
    	background-color: #fff;
    }
    
    #lsidebar {
    	float: left;
    	width: 192px;	
    }
    
    #rsidebar {
    	float: right;
    	width: 192px;	
    }
    
    #sidebar .box h2, #sidebar h2 {
    	font: bold 1.0em Verdana, Arial, Helvetica, sans-serif;
    	margin-top: 5px;
    	color: #fff;
    	background-color: #ABAE9B;
    	padding: 7px;
    }
    
    #sidebar a {
    	color: #333;
            text-decoration:none;
    }
    
    #sidebar a:hover {
    	color:#ca1717;
    }
    
    #sidebar ul {
    	list-style-type: none;
    	margin: 0 0 15px 0;
    	padding: 0;
    }
    
    #sidebar ul li {
    	background-color: #fff;
    	border-bottom: 1px dotted #ddd;
    	margin-bottom: 0.2em;
    	padding: 0.3em;
    }
    
    #sidebar ul li ul{
    	list-style-type: square;
    	margin-left: 1.5em;
    	padding: 0;
    	border: 0;
    }
    
    #sidebar ul li ul li {
    	border: 0;
    }
    
    /************************************************
    *	Footer  									*
    ************************************************/
    	
    #footer {
    	background-color: #322E2B;
    	width: 928px;
    	margin: 5px 0 0 0;
    	padding: 6px;
    }
    
    #footer p {
    	margin: 0px;
    	font-size: 11px;
    	padding: 0px;
    	color: #CCCCCC;
    }
    
    #footer p a {
    	color: #ccc;
    	border-bottom: 1px solid #CCCCCC;
            text-decoration:none;
    }
    
    #footer p a:hover {
    	color: #fff;
    	border-bottom: #1px solid #fff;
    }
    
    #footer .left {
    	float: left;
    	width: 80%;
    }
    
    #footer .right {
    	float: right;
    	width: 20%;
    	text-align: right;
    }
    
    
    /************************************************
    *	Comment  									*
    ************************************************/	
    
    .commentsblock textarea {
    	width: 478px;
    }
    
    .commentsblock input, .commentsblock textarea {
    	border: 1px solid #d1d1d1;
    }
    
    .commentsblock textarea:focus {
    	background: #eee;
    	border: 1px solid #a1a1a1;
    }
    
    .commentsblock textarea:focus, .commentsblock input:focus {
    	background: #eee;
    	border: 1px solid #a1a1a1;
    }
    
    ol.commentlist {
    	color: #000;
    	list-style-type: none;
    	margin: 0;
    	margin-top: 1.5em;
    	padding: 0;
    }
    
    .commentlist li {
    	margin-bottom: 2em;
    	padding: 0.5em 1em;
    }
    
    .alt1 {
    	border: 1px solid #F2F0E8;
    	padding: 0.5em;
    }
    
    .alt2 {
    	padding: 0.5em;
    	border: 1px solid #F2F0E8;
    }
    
    h3#comments {
    	font-size: 1.6em;
    }
    
    .commentcount {
    	float: right;
    	font-size: 20px;
    	font-weight: bold;
    }
    
    .commentcount a {
    	color: #cccccc;
            text-decoration: none;
    }
    
    .commentcount a:hover {
    	color: #999999;
    }
    
    .commenttext {
    
    }
    Code (markup):
     
    jhmattern, Oct 17, 2008 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    You only have underlines set when you hover over the links, which I believe is what you want.

    I believe you are reffering to a border-bottom which has been set on some of the anchor tags, which sort of looks like an underline I guess.

    Here this is referenced from your CSS, the parts in bold, are causing the borders:

    
    
    .entry a, .commentlist a, .navigation a {
    	color:#6699cc;
            text-decoration: none;
    [B]	border-bottom: #222 solid 1px;[/B]
    }
    
    
    .entrytitle h2 a {
    [B]	border-bottom: 1px solid #6699cc;[/B]
    	color: #3E3E3E;
            text-decoration: none;
    }
    
    
    
    Code (markup):
     
    wd_2k6, Oct 17, 2008 IP
    jhmattern likes this.
  3. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #3
    Thank you! Thank you! Thank you!

    I knew it had to be something stupidly simple. I was just so focused on finding the underline issue that I never would have noticed something else looking similar. I can breathe easy now - you're officially my favorite person today. :)
     
    jhmattern, Oct 17, 2008 IP
Thread Status:
Not open for further replies.