CSS Not Working...

admin

Administrator
Staff member
I have the following in style.css...
a.white:link {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
a.white:visited {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
a.white:hover {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
a.white:active {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}

But when I try to use it in the script I get this (<!-- m --><a class="postlink" href="http://www.xfactor-studios.com/css.jpg">http://www.xfactor-studios.com/css.jpg</a><!-- m -->)...
As you can see "View" is working but "Buy" is not.
Here is the code I am using to execute it the styles...

echo "<table width=\"145\" border=\"0\" cellspacing=\"2\">";
echo "<tr align=\"center\">";
echo "<TD WIDTH=\"100%\" HEIGHT=\"22\" COLSPAN=\"2\" class=\"botpreview\">";
echo "<a class=\"white\" href=http://www.webdeveloper.com/forum/archive/index.php/\"fullview.php?tempid=$id\">View</a> | ";
echo "<a onClick=\"MM_openBrWindow2('buy.php?tempid=$id&type=general','')\"><span class=\"white\">Buy</span></a></td>";
echo "<tr><td width='50%'>";
echo "<span class=\"tinfo\">";
echo "Type:<br>";
echo "Item:<br>";
echo "Author:<br>";
echo "Download :</span><br></td><td width='50%'>";
echo "<span class=\"tinfo\"><b>$catname</b><br>";
echo "$id<br>";
echo "$authorname<br>";
echo "$Download </span></td></table>";


I am in a hurry to get this done so a quick response would be appriciated. :-D
Thanks in advance.Well, you've put the 'class' part in the span tag, but you're referencing the 'a' tag in the css. You have 'a.white' when you should be referencing 'a span.white'. The easiest thing (as far as I can see) would be to remove the span tags and put the 'class' in the 'a' tag (as then it would be the same as 'view').Thanks for the fast response but, I tried already and it made the Buy big and green.(a.link)Can you show us the page (a link)?Is this what you want to see?
**Update**
There is my entire style.css

a:link {
font-family:Tahoma, Verdana, Arial;
color: #73A41D;
text-decoration:underline;
font-weight: bold;
}
a:visited {
font-family:Tahoma, Verdana, Arial;
color: #73A41D;
text-decoration:underline;
}
a:hover {
font-family:Tahoma, Verdana, Arial;
color: #73A41D;
text-decoration:underline;
}
a:active {
font-family:Tahoma, Verdana, Arial;
color: #73A41D;
text-decoration:underline;
}
a.white:link {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
a.white:visited {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
a.white:hover {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
a.white:active {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
.price{
font-family:Tahoma, Verdana, Arial;
font-size:11px;
font-weight:bold;
color:#434343;
}
.up{
font-family:Tahoma, Verdana, Arial;
font-size:11px;
color:#434343;
}
.upq{
font-family:Tahoma, Verdana, Arial;
font-size:11px;
color:3989C5;
}
.tinfo{
font-family:Tahoma, Verdana, Arial;
font-size:11px;
color:#434343;
}
.smallpad {
padding:1px;
color:#434343;
}
.pricestyle {
padding:3px;
color:#535353;
border-top-style:solid;
border-top-width:1px;
border-top-color:#434343;
}
.botpreview {
background-color:#3F89C3;
color:#FFFFFF;
border-top-color:#FFFFFF;
border-top-width:1px;
border-top-style:solid;
text-align:center;
vertical-align:middle;
}
.normal {
font-family:Tahoma, Verdana, Arial;
font-size:11px;
color:#434343;
}
.searchtitle {
font-size: 9px;
font-family:Tahoma, Verdana, Arial;
color: #999999;
font-weight: bold;
}
.affiliatetitle1 {
font-family:Tahoma, Verdana, Arial;
color: #4E94C0;
font-size: 13px;
font-weight: bold;
}
.affiliatetitle2 {
font-family:Tahoma, Verdana, Arial;
color: #434343;
font-size: 13px;
font-weight: bold;
}
.affiliatebox {
font-family:Tahoma, Verdana, Arial;
color:#434343;
font-size: 11px;
font-weight: bold;
}No, I want a link to your (live) page (online). I want to see the big picture.I have been changing things around and it seems that the onclick is messing things up...Oh ok, here is the link I changed it some but it under the Featured Templates section.
<!-- m --><a class="postlink" href="http://www.xFactor-Studios.com/v2/">http://www.xFactor-Studios.com/v2/</a><!-- m --> its normally a locked directory because it is not finished, but i'll unlock it until my issue is solved.
**Edit**
Crap, sorry for the double post I was not thinking...

**Edit Again**
Here is an update of what I have...

index.php

echo "<table width=\"145\" border=\"0\" cellspacing=\"2\">";
echo "<TR>";
echo "<TD HEIGHT=\"22\" COLSPAN=\"2\" class=\"botpreview\">";
echo "<a style=\"cursor: hand\" href=http://www.webdeveloper.com/forum/archive/index.php/\"fullview.php?tempid=$id\" target=\"_blank\" class=\"white\">View</a> | ";
echo "<a href=http://www.webdeveloper.com/forum/archive/index.php/\"http://www.xFactor-Studios.com/v2/\" class=\"white\">---xFS---</a> | ";
echo "<a onClick=\"MM_openBrWindow2('buy.php?tempid=$id&type=general','')\" class=\"white\">Buy</a></TD>";
echo "</TR><tr><td width='100%'><span class=\"tinfo\">";
echo "Type:<br>";
echo "Item:<br>";
echo "Author:<br>";
echo "Download :</span><br></td><td width='50%'>";
echo "<span class=\"tinfo\"><b>$catname</b><br>";
echo "$id<br>";
echo "$authorname<br>";
echo "$Download </span></td></table>";


style.css

a:link {
font-family:Tahoma, Verdana, Arial;
color: #73A41D;
text-decoration:underline;
font-weight: bold;
}
a:visited {
font-family:Tahoma, Verdana, Arial;
color: #73A41D;
text-decoration:underline;
}
a:hover {
font-family:Tahoma, Verdana, Arial;
color: #73A41D;
text-decoration:underline;
}
a:active {
font-family:Tahoma, Verdana, Arial;
color: #73A41D;
text-decoration:underline;
}
a.white:link {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
a.white:visited {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
a.white:hover {
color: #000000;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}
a.white:active {
color: #FFFFFF;
text-decoration:underline;
cursor:pointer;
font-size:11px;
}The post above is kinda long so I am making a new one.
I got it working right but had to take out the onclick...
Any idea as to why this is please let me know...

Here is the solution incase anyone else has the problem...

echo "<table width=\"145\" border=\"0\" cellspacing=\"2\">";
echo "<TR>";
echo "<TD HEIGHT=\"22\" COLSPAN=\"2\" class=\"botpreview\">";
echo "<a style=\"cursor: hand\" href=http://www.webdeveloper.com/forum/archive/index.php/\"fullview.php?tempid=$id\" target=\"_self\" class=\"white\">View</a> | ";
echo "<a href=http://www.webdeveloper.com/forum/archive/index.php/\"http://www.xFactor-Studios.com/v2/\" class=\"white\">---xFS---</a> | ";
echo "<a style=\"cursor: hand\" href=http://www.webdeveloper.com/forum/archive/index.php/\"buy.php?tempid=$id&type=general\" target=\"_blank\" class=\"white\">Buy</a>";
echo "</TD></TR><tr><td width='100%'><span class=\"tinfo\">";
echo "Type:<br>";
echo "Item:<br>";
echo "Author:<br>";
echo "Download :</span><br></td><td width='50%'>";
echo "<span class=\"tinfo\"><b>$catname</b><br>";
echo "$id<br>";
echo "$authorname<br>";
echo "$Download </span></td></table>";



Still if you can help me figure out why I cannot use the onclick I would greatly appriciate it.
ThanksHave you tried using a DTD? They're all the rage these days.
 
Back
Top