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 8 of 8
  1. #1
    New Coder
    Join Date
    Jan 2012
    Posts
    53
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Question Need some css help for the anchor tag

    hello CF right now i can not figure out why my css is not working also this is my first error ever with css.

    Anyways ive hardly done work on the site before i uploaded to the web so im using the sites own editor which i do not think is the problem though it may be.

    Anyways again here my current coding for what im working on.

    CSS:

    Code:
    body {background-image: url(/images/Backgorund.jpg);
          color: white;
          }
          
    .Back {Position: absolute;
    		top: 75%;
    		left: 50%;
    	a:link: { color: rgb (255, 255, 255); }
            a:visited: { color: rgb (138, 138, 138); } 
            a:hover: { color: rgb (198, 198, 198); }
            a:active: { color: rgb (68, 68, 68);} 
    	}
    I have also tried putting the css part for the colors in the body part and that did not work, im thinking it may be because it needs to be in a form like this:
    Code:
    a {all the css code for the a here}
    and here is the html for what im doing it on:

    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">
    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="CSS.css" />
    <title>Calculator 1 - D34th.com
    </title>
    </head>
    <body>
    To download our program Click on download Below<br/><br/><br/><p><a href="/Programs/Calculator1.exe">Download</a></p>
    <p class="Back"><a href="index.html">Go Back</a></p>
    </body>
    </html>
    also for any one who wants the site for it here d34th.host-ed.me tip: if you do not like godsmack then mute as i have the site auto play voodoo by them when its visited only on the homepage though.

    Also another thing is i would only like to change the go back part of it which is why i originally had the css in the .Back part since that is my go back class

    Also i have tried using colors but not even that was working.
    Last edited by D34th Maker; 01-29-2012 at 08:39 PM.

  • #2
    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 D34th Maker,
    Looking at your http://d34th.host-ed.me/d34th_auto_clicker.html , there is a few things you could improve on.
    Look at the links in my signature about DocTypes. You need one.
    There are also links about validation in my signature, they will help you.
    Instead of using the break tag to create space (<br> is for making a linebreak in text), use a little margin on that anchor.
    Why wrap your anchors in paragraph tags? They are not paragraphs.

    I'm kind of unclear what your specifically wanting to fix. The Go Back link is there, it's just off the page. Try this instead? -
    Code:
    .Back {Position: Absolute;
    		top: 90%;
    		left: 48%;
    		}
    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

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Just as an example -
    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>D34th.com - D34ths Auto Clicker</title>
    <style type="text/css">
    html, body {
    	margin: 0;
    	background: #fc6;
    }
    #container {
    	width: 760px;
    	margin: 30px auto;
    	padding: 20px;
    	background: #999;
    }
    p a {
    	display: block;
    	margin: 25px 0 0 25px;
    }
    	#back:link,
    	#back:visited {
    		position: absolute;
    		top: 90%;
    		left: 48%;
    		color: #333;
    	}
    	#back:hover,
    	#back:active {color: #f00;}
    </style>
    </head>
    <body>
        <div id="container">
        	<p>
            	To download our program Click on download Below<br />
                <a href="/Programs/D34ths Auto Clicker.exe">Download</a>
            </p>
            <a href="index.html" id="back">Go Back</a>
        <!--end container--></div>
    </body>
    </html>
    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

  • #4
    New Coder
    Join Date
    Jan 2012
    Posts
    53
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by Excavator View Post
    Hello D34th Maker,
    Looking at your http://d34th.host-ed.me/d34th_auto_clicker.html , there is a few things you could improve on.
    Look at the links in my signature about DocTypes. You need one.
    There are also links about validation in my signature, they will help you.
    Instead of using the break tag to create space (<br> is for making a linebreak in text), use a little margin on that anchor.
    Why wrap your anchors in paragraph tags? They are not paragraphs.

    I'm kind of unclear what your specifically wanting to fix. The Go Back link is there, it's just off the page. Try this instead? -
    Code:
    .Back {Position: Absolute;
    		top: 90%;
    		left: 48%;
    		}
    it is on there as its more in the middle which is why i wanted to change the link colors since it blends into the skull. though i tried making the skull 100% by 100% so it would fill it to the exact match of any ones CPU but i could not figure the css for it and failed at each attempt cause your only seeing about 80-95 % of the bg on my pc since i do not have a way to make it to where it will adjust automatically.
    but anyways yeah i might try to get rid of the <p> that are using the anchors and see if that works, i also changed the doc type part of it so maybe it will work for me as im hoping it will, but basically all im asking was why my css colors are not working though it might just be me using paragraohs where i should not.

    Quick edit to show where im talking about:
    Last edited by D34th Maker; 01-29-2012 at 10:04 PM.

  • #5
    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 D34th Maker View Post
    basically all im asking was why my css colors are not working though it might just be me using paragraohs where i should not.
    Invalid:
    Code:
    a:link: { color: rgb (255, 255, 255); }
            a:visited: { color: rgb (138, 138, 138); } 
            a:hover: { color: rgb (198, 198, 198); }
            a:active: { color: rgb (68, 68, 68);} 
    	}
    Valid:
    Code:
    	 a:link { color: rgb(255,255,255); }
            a:visited { color: rgb(138,138,138); } 
            a:hover { color: rgb(198,198,198); }
            a:active { color: rgb(68,68,68);}
    Left those spaces in to show those don't matter. The other spaces did matter, I would write it like this -
    Code:
    	a:link {color: rgb(255,255,255);}
            a:visited {color: rgb(138,138,138);} 
            a:hover {color: rgb(198,198,198);}
            a:active {color: rgb(68,68,68);}
    Last edited by Excavator; 01-29-2012 at 10:14 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

  • #6
    New Coder
    Join Date
    Jan 2012
    Posts
    53
    Thanks
    0
    Thanked 3 Times in 3 Posts
    yeah i viewed your example one and they work perfect so ill change it a little in a bit after all ice hardly done any coding.

  • #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 D34th Maker View Post
    yeah i viewed your example one and they work perfect so ill change it a little in a bit after all ice hardly done any coding.
    Like I said, "There are also links about validation in my signature, they will help you."
    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

  • #8
    New Coder
    Join Date
    Jan 2012
    Posts
    53
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by Excavator View Post
    Like I said, "There are also links about validation in my signature, they will help you."
    yeah i have two bookmarks for css and html though sometimes the html ones gives me stuff that i cannot really change without it more in likely f-ing my site up but thanks for your time


  •  

    Posting Permissions

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