Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Missing Something or...

    Wanting to add a image but don't want it to have any coding for the hover.

    for a css style I have the following for the links:

    /* Links */
    a:link, a:visited {
    text-decoration: none;
    color: #AE855C;
    }
    a:hover {
    border-bottom: 1px dotted #AE855C;
    }
    a.more-link {
    padding-bottom: 2px;
    font-weight: bold;
    border-bottom: 1px dotted #AE855C;
    }
    a:hover.more-link {
    text-decoration: none;


    for the images I have:

    /* Images */
    img {
    background: #FAFAFA;
    border: 1px solid #DCDCDC;
    padding: 8px;
    }


    the image goes:

    #rss {
    background: transparent;
    border: none;
    padding: 0px;
    margin: 0px 0px 0px 70px;}

    #rss a {border-bottom: none;}
    #rss a:hover {border-bottom: none;}


    should it be in a ID or class? I'm missing something

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    should it be in a ID or class? I'm missing something
    Your query is not clear, though if you are having difficulties to understand id/class selectors, read http://htmldog.com/guides/cssintermediate/classid/
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Just for one image

    I need to turn off the text decoration off the link for the image

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello mtporter,
    It looks like border: none; should cascade to the a and a:hover. How are you adding the id rss, to the image or the anchor?

    See if this works -
    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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    html, body {
    	font: 100% "Comic Sans MS";
    	background: #FC6;
    }
    #container {
    	width: 800px;
    	margin: 30px auto;
    	padding: 50px;
    	background: #999;
    	overflow: auto;
    	font-size: 1.8em;
    }
    /* Links */
    a:link, a:visited { 
    	text-decoration: none;
    	color: #AE855C; 
    }
    a:hover {border-bottom: 4px dotted #AE855C;}
    	/* Images */
    	img {
    		background: #FAFAFA;
    		border: 1px solid #DCDCDC;
    		padding: 8px;
    	}
    		#rss {
    			background: transparent;
    			border: none;
    			padding: 0px;
    			margin: 0px 0px 0px 70px;
    		}
    
    </style>
    </head>
    <body>
        <div id="container">
            <a href="">Link</a>
                    <a href="" id="rss"><img src="rss.jpg" alt="description" width="101" height="95" /></a>		
        <!--end container--></div>
    </body>
    </html>
    Last edited by Excavator; 01-17-2010 at 04:53 PM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    It works now, thanks

    here is the code that is in the header.php

    I put both the id in the anchor and the image tag:

    <a href="<?php bloginfo('url'); ?>/?feed=rss2" id="rss"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rss.png" title="Join RSS Feed" id="rss" /></a>

    The stylesheet has:

    #rss {
    background: transparent;
    border: 0px;
    padding: 0px;
    margin: 0px 0px 0px 0px;}
    #rss a:hover {
    text-decoration:none;}


    Is it because I didn't have the id in both the href tag and image tag?

  • #6
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Email notifications

    where do I go or how do I turn on email notifications when there are responses or replies?

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by mtporter View Post

    Is it because I didn't have the id in both the href tag and image tag?
    No, you're styling the anchor. That's where the id should go... usually anyway.
    id can only be used once. Run your code through the validator once and see.

    http://www.tizag.com/cssT/cssid.php
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •