SitePoint Sponsor |
|
User Tag List
Results 1 to 20 of 20
-
Feb 7, 2006, 18:04 #1
- Join Date
- Oct 2001
- Location
- New York
- Posts
- 688
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This is so simple it is stupid.....but I still can't get it...
Hello All:
I am fairly new to CSS and am having trouble with this line of code and do not know what to do next.
At this link http://www.thechimneystore.com you will see in the Product Catagories listed that all are listed according to this CSS :
Code:.leftnavMainCat A {color:black;font-weight:bold;font-size:12px;} .leftnavMainCat A:link {text-decoration:none;font-weight:bold;} .leftnavMainCat A:visited {text-decoration:none;font-weight:bold;} .leftnavMainCat A:hover {text-decoration:underline;font-weight:bold;} .leftnavMainCat A:active {text-decoration:none;font-weight:bold;} .leftNavSubCat A {color:black;margin-left:8px;font-size:12px;} .leftnavSubCat A:link {text-decoration:none;font-weight:normal;} .leftnavSubCat A:visited {text-decoration:none;font-weight:normal;} .leftnavSubCat A:hover {text-decoration:underline;font-weight:normal;} .leftnavSubCat A:active {text-decoration:none;font-weight:normal;}
<TD class=leftnavMainCat><ss:foreach item="category" within="$catalog.categoryList()"> <ss:if test="$category.treeLevel == '1'"><ss:link source="$category"/><BR><ss:else/></ss:if></ss:foreach>
<TR>
<TD class=leftNavSubCat><SPAN style="LEFT: 8px; POSITION: relative"><ss:link source="$category"/><BR></SPAN></SPAN></SPAN>
<P></P></TD></TR>
My question is where do I tell the above HTML that the SUB CAT to apply the leftnaveSubCat Class? I tried adding another TD and TR as you can see but it does nothing.
Any help would be appreciated,
Paul********
Regards,
P
-
Feb 7, 2006, 18:10 #2
- Join Date
- Jan 2006
- Posts
- 20
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Try putting "td" in front of each css class. For example:
td.leftNavMainCat
It may or may not do anything, but it is worth a try.
-
Feb 7, 2006, 18:30 #3
- Join Date
- Oct 2001
- Location
- New York
- Posts
- 688
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hrmmmm
Originally Posted by mattherb182
Isn't that a little redundant??
I will do it and see what happens.********
Regards,
P
-
Feb 7, 2006, 18:56 #4
- Join Date
- Jan 2005
- Location
- Netherlands
- Posts
- 4,300
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hello
uppercase, lowercase ? if nothing chages on visited active, you need no code for it
it needs the A Tag ?
Please validate your code and use a DTD with no content above it
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>12345 12345 12345 12345 12345 </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .leftnavmaincat a {color:#000000;font-weight:bold;font-size:12px;text-decoration:none;} /*.leftnavmaincat a:link {text-decoration:none;font-weight:bold;} .leftnavmaincat a:visited {text-decoration:none;font-weight:bold;}*/ .leftnavmaincat a:hover {text-decoration:underline;} /*.leftnavmaincat a:active {text-decoration:none;font-weight:bold;}*/ .leftnavsubcat a {color:black;margin-left:8px;font-size:12px;text-decoration:none;} /*.leftnavsubcat a:link {text-decoration:none;font-weight:normal;} .leftnavsubcat a:visited {text-decoration:none;font-weight:normal;}*/ .leftnavsubcat a:hover {text-decoration:underline;} /*.leftnavsubcat a:active {text-decoration:none;font-weight:normal;}*/ .leftnavsubcat span{left:8px;position:relative} --> </style> </head> <body> <table border="1" cellpadding="0" cellspacing="0" width="400"> <tr> <td class=leftnavmaincat> <ss:foreach item="category" within="$catalog.categoryList()"> <ss:if test="$category.treeLevel == '1'"> <ss:link source="$category"/> <br> <ss:else/></ss:if> </ss:foreach> </td> </tr> <tr> <td class=leftnavsubcat> <span><ss:link source="$category"/><br></span> </td> </tr> </table> <p><br /></p> <table border="1" cellpadding="0" cellspacing="0" width="400"> <tr> <td class=leftnavmaincat> <a href="##">12345</a> </td> </tr> <tr> <td class=leftnavsubcat> <a href="##">abcdf</a> </td> </tr> </table> </body> </html>
-
Feb 7, 2006, 19:09 #5
- Join Date
- Oct 2001
- Location
- New York
- Posts
- 688
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks but...
Thanks for that explaination but I am not getting what you are saying. Does CSS need to be either lowercase or upper not mixed and I am not following you when you talk about the a visited with active
Sorry to be so dense on css, did I mention I was a noob.********
Regards,
P
-
Feb 7, 2006, 19:15 #6
You should put the class="leftnaveSubCat" in the div, tr, whatever, that you want to apply the properties of the class leftnaveSubCat to.
Double check the spelling, and capitalization, if it's not exactly the same in your CSS as it is in your page it will be seen as a seperate class and nothing will happen.
-
Feb 7, 2006, 19:16 #7
- Join Date
- Jan 2005
- Location
- Netherlands
- Posts
- 4,300
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hello
PS well dis is a Surprice DocType
Use lowercase for all your HTML Tags, CSS class names, ID names, (Java)Script, etc
visited / active, it changes NO? (a color NO?, a bgr color NO?, bold NO?) so you don't need code for it
Did you view my code in a Browser ?
-
Feb 7, 2006, 19:22 #8
I didn't even realize you had code on here. Lol
Who are you?
What do you want from me?
-
Feb 7, 2006, 19:29 #9
- Join Date
- Jan 2005
- Location
- Netherlands
- Posts
- 4,300
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by DocType
lol
http://www.sitepoint.com/forums/show...Type+all4nerds
-
Feb 7, 2006, 19:29 #10
- Join Date
- Oct 2001
- Location
- New York
- Posts
- 688
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes,
All4 Nerds,
Thanks for the explanation on what you were saying however when I checked your code in my store it broke the code that was in there.
All I want is the subnavcat to not be bold but I cannot seem to seperate what I have there that says:
<TD class=leftnavMainCat><ss:foreach item="category" within="$catalog.categoryList()"> <ss:if test="$category.treeLevel == '1'"><ss:link source="$category"/><BR><ss:else/></ss:if></ss:foreach>
<TR>
<TD class=leftNavSubCat><SPAN style="LEFT: 8px; POSITION: relative"><ss:link source="$category"/><BR></SPAN></SPAN></SPAN>
<P></P></TD></TR>
like I want to other wise is breaks the code that is pulling my categories.********
Regards,
P
-
Feb 7, 2006, 19:35 #11
Hey Tom, just tell it not to be bold.
How's it going a4n?
-
Feb 7, 2006, 19:55 #12
- Join Date
- Oct 2001
- Location
- New York
- Posts
- 688
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
when I say...
doctype, when I say break my code it no longer shows my sub categories as a result.
So I have resulted in going back to what I had where it is all bold.********
Regards,
P
-
Feb 7, 2006, 20:12 #13
O.K. so you want it that way, just not bold; Right?
-
Feb 7, 2006, 20:15 #14
- Join Date
- Oct 2001
- Location
- New York
- Posts
- 688
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yess
Yes!
That is the way I want it.
I have been playing with it sorry for the slow response.********
Regards,
P
-
Feb 7, 2006, 20:21 #15
That's what I thought.
The thing is, somewhere you have to be telling it to be bold, otherwise the font weight would be normal.
So find where you're making it bold, and change it to normal font weight, by simply not specifying bold.
-
Feb 7, 2006, 20:29 #16
- Join Date
- Aug 2004
- Location
- philippines
- Posts
- 574
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
.leftNavSubCat A {color:black;margin-left:8px;font-size:12px;}
.leftnavSubCat A:link {text-decoration:none;font-weight:normal;}
.leftnavSubCat A:visited {text-decoration:none;font-weight:normal;}
.leftnavSubCat A:hover {text-decoration:underline;font-weight:normal;}
.leftnavSubCat A:active {text-decoration:none;font-weight:normal;}
to this
.leftNavSubCat A {color:black;margin-left:8px;font-size:12px;}
td.leftnavSubCat A:link {text-decoration:none;font-weight:normal;}
td.leftnavSubCat A:visited {text-decoration:none;font-weight:normal;}
td.leftnavSubCat A:hover {text-decoration:underline;font-weight:normal;}
td.leftnavSubCat A:active {text-decoration:none;font-weight:normal;}
then
<td class="leftnavSubCat">
im not sure, but this is what i do..If you won't dress like the
Victoria Secret girls,
don't expect us to act like soap opera guys.
-
Feb 7, 2006, 20:30 #17
- Join Date
- Oct 2001
- Location
- New York
- Posts
- 688
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks
Ok, thanks for all your help DocType.
I will keep poking around with this and see.********
Regards,
P
-
Feb 7, 2006, 20:36 #18
I'm not sure exactly what you have going there.
Getting rid of the font-weight:bold; might fix it, unless you're trying to apply bold to specific text.
If the latter is true, you might want to use a <span class="changFontWeight" (or whatever you want to call it) to give you more flexibility in applying the bold to the specific text.
-
Feb 10, 2006, 18:15 #19
- Join Date
- Jan 2006
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by lance_vincent
this should work but sometimes browsers get quirky and they want their font stylings in a span tag not the td, so if that doesn't work try to move it in the span--
also try to avoid inline styles and positioning - yuour span tag with no font style could be overriding your class.. just a thought
-
Feb 10, 2006, 18:22 #20
- Join Date
- Oct 2001
- Location
- New York
- Posts
- 688
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks
Thanks schachin:
I appreciate your tip however the laws of the web do not apply to Homestead.
What is homestead you ask, well.....It is the crappiest web service known to the world. Attracting people who do not know any better and suckering them into a price that is just ungodly for this service.
Just my 2 cents..********
Regards,
P
Bookmarks