View Full Version : a:link not correctly shown
boxxertrumps
10-20-2006, 10:31 PM
I am using this code in my main CSS
a:link {color: #AA0000;TEXT-DECORATION: none}
a:visited {color: #660000;TEXT-DECORATION: none}
a:hover {color: #FFFFFF;TEXT-DECORATION: none}
a:active {color: #666666;TEXT-DECORATION: none}
img {vertical-align: middle;text-align: center;border: none;}
and for some reason, the anchors wants to be blue and underlined, and the pictueres have a blue border also... any hellp apperciated,
From your freind,
Ryan "Boxxertrumps" Trumpa
djr33
10-20-2006, 10:34 PM
Hmm... I don't know CSS that well.
It looks fine to me.
I'd add semicolons at the end of the first 3 lines, spaces after the semicolons in other places and make the TEXT-DECORATION lowercase. I don't think any other these really affect performance, but it's good to be consistant/standard.
Also, you should do:
thing {
property: value;
another: etc;
}
so you have multiple lines... easier to organize.
text-align is invalid for images, I think. Just align should be good there.
Since you aren't using classes, then it shouldn't be the rest of your page's coding that's hurting it.... not sure.
the-disturbed
10-20-2006, 11:58 PM
a:link {color: #710000}
a:visited {color: #BB0000}
a:active {color: #FF9393}
a:hover {color: #FF6666}
that's right from my site^^
for the pictures with the borders, i have images as link on my site, and you need to define " border="0" " at the end of the IMG tag, that'll take care of the border, just a side note, its a good idea to have links underlined because that's what people are used to seeing, and they might miss it unless it's really obvious that its a link. djr33 is right about the multi-lin thing, but it needs to be:
thing {
property: value;
another: etc
}
only difference: no semi-colon on the last property, because technically the close brace is on the end of that last prperty (another: etc} )
djr33
10-21-2006, 12:16 AM
"technically the close brace is the end of the last property"
No... since it's the last property, leaving the semicolon off is allowed... but technically should be there.
the-disturbed
10-21-2006, 12:21 AM
guess i shouldn't talk i just learned CSS from W3 they say to leave it off, they're the bosses so i went with it, lol, havn't tried it with the semi-colon
djr33
10-21-2006, 12:31 AM
Well, neither way is wrong. They should both work.
CSS, like Javascript, is a loose language that will allow imperfect syntax.
In fact, I'm not sure which is correct. I should look that up. I'm basing this off my other knowledge and what I've heard.
In a language like PHP that MUST have the right syntax, the semi-colons are always there. JS/CSS are a bit kinder, but this can also lead to problems. If your use of semicolons is inconsistant or abnormal, a simple error can be overlooked or hard to find.
the-disturbed
10-21-2006, 02:06 AM
as i said W3 told me that, i seem to have better compatability in browsers other then IE when i listen to them thats all, plus u save the difficult task of pressing the semi-colon key
*strains*............ ;
lmao
blm126
10-21-2006, 02:33 AM
I think you w3schools.com not the W3. There is a huge difference
rhianoran
10-21-2006, 03:38 AM
would you mind sharing what that difference is? lol just joined and browsing.
the-disturbed
10-21-2006, 03:46 AM
w3.org is like the company website, w3schools.com is, well the school, it's loaded with tutorials, how tos, very useful resource......and yes i was refering to w3schools when i said w3
rhianoran
10-21-2006, 03:54 AM
oh ok, thank you. i've been coding for like 8 years (badly i might add) but only recently started reading things with the "w3" infront (to get rid of my badness)
mwinter
10-21-2006, 11:43 AM
Addressing the actual question: please post a link to a demonstration, Ryan.
No... since it's the last property, leaving the semicolon off is allowed... but technically should be there.
Should be there? It's not a bad idea (I always include it), but "should" is overstating the issue.
w3.org is like the company website, w3schools.com is, well the school
Huh?
The World Wide Web Consortium (W3C) is a group composed of various companies and organisations that have a vested interest in the Web. By forming a consensus among these industry leaders and research groups, the W3C provides a forum for the development and promotion of Web standards. It owns the w3.org domain.
The site, www.w3schools.com, is owned by a private company that provides tutorials and information regarding various Web development topics. It is an entirely separate entity, not in any way related to the W3C.
it's loaded with tutorials, how tos, very useful resource
It's also not one to be trusted: it's information is, at times, misleading or out-and-out wrong. In that way, it's much like any other Web tutorial site, but the frequently mistaken relationship to the W3C makes mistakes even worse.
Mike
boxxertrumps
10-22-2006, 02:36 PM
im sorry, but i cant post a link b/c the page is on my comp. and im trying to get everything to look/work right before i put up my server 24/7, and my freewebs page is looking fine even though its almost the same code... ill try the suggestions that have been posted, and ill try adding just a {color:cc0000}
to the code if nothing else works...
and a few seconds later...
a {
color: #AA0000;
text-decoration: none}
a:link {color: #AA0000;}
a:visited {color: #660000;}
a:hover {color: #FFFFFF;}
a:active {color: #666666;}
img {
vertical-align: middle;
border: 0px;}
is the code im using, but still nothing...
wait..i have encountered a paradox, Legal code works in IE but not Mozzilla!!!
Its the apocalypse... *weeps in a corner*
boxxertrumps
10-22-2006, 02:50 PM
my css....
body {
font-size: small;
background-color:#777777;
font-family:Impact,"Halo Outline","Comic Sans Ms";
}
h2 {
font-family:"Halo Outline",Impact,"Comic Sans Ms";
font-weight: 1000;
text-align: center;
cursor: crosshair;
font-size: 28pt;
border-style: solid;
border-color: #999999 #555555 #555555 #999999;
a {
color: #AA0000;
text-decoration: none}
a:link {color: #AA0000;}
a:visited {color: #660000;}
a:hover {color: #FFFFFF;}
a:active {color: #666666;}
img {
vertical-align: middle;
border: 0px;}
.footer {text-align: center; font-size: smallest;}
.footer img {border: 1px solid #888;}
p{font-family: "Comic Sans MS", Impact, Cursive; font-weight: 900; text-align: center;}
label {display: block;}
label.registerError {border: 1px solid red;}
span.registerError {font-weight: bold; color: red;}
div.list {border: 1px solid #000000}
and HTML code...
<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>
<title>BoxxerTrumps</title>
<link rel="stylesheet" type="text/css" href="css.css"/>
</head>
<body bgcolor="#777777">
<a href="host">Login & Edit Your Site.</a> Also,<a href="users">Index Of Users.</a>
<h2>
<a onclick="window.open('indexv2.html', '_blank', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=1000,height=750'); return false;" href="">Enter</a>
</h2>
<p><div>I have recently installed a PHP module(<a href="http://quixplorer.sourceforge.net/">Quixplorer</a>),
which allows me to edit my site from anywhere. This also means that I can create user accounts so that
I can host webpages(similar to freewebs), which means my freinds can have a webpage on my site. Or many.
And i support PHP and can install other SSI encoders if you want me to. Use the Email Form
<a href="http://boxxer.mooo.com:379/formmailer.php">Here</a><br />If you want an account. Please keep your
section to less than 1GB. Any questions can be emailed to me.</div></p>
<br/>
<center><hr />
<p class="footer">Abyss Web Server - Copyright © 2001-2006
<a href="http://www.aprelium.com">Aprelium Technologies - All rights
reserved
<br/>
<img src="pwrabyss.gif" alt="Powered by Abyss Web Server" title="Powered by Abyss Web Server" border="0" width="88" height="31"/></a></p><hr />
Google ads
</center></body></html>
sorry the most i can get you is the code...
ps sorry bout double post...
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.