SitePoint Sponsor

User Tag List

Results 1 to 20 of 20
  1. #1
    SitePoint Guru tombempty's Avatar
    Join Date
    Oct 2001
    Location
    New York
    Posts
    688
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy 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;}
    and in the HTML I have this code:

    <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

  2. #2
    SitePoint Member
    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.

  3. #3
    SitePoint Guru tombempty's Avatar
    Join Date
    Oct 2001
    Location
    New York
    Posts
    688
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hrmmmm

    Quote Originally Posted by mattherb182
    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.
    You mean inside the <TD class=td.leftnavmaincat>

    Isn't that a little redundant??

    I will do it and see what happens.
    ********
    Regards,

    P

  4. #4
    Non-Member
    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>

  5. #5
    SitePoint Guru tombempty's Avatar
    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

  6. #6
    SitePoint Guru DocType's Avatar
    Join Date
    Feb 2005
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  7. #7
    Non-Member
    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 ?

  8. #8
    SitePoint Guru DocType's Avatar
    Join Date
    Feb 2005
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't even realize you had code on here. Lol

    Who are you?

    What do you want from me?

  9. #9
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DocType
    I didn't even realize you had code on here. Lol

    Who are you?

    What do you want from me?
    Hello

    lol
    http://www.sitepoint.com/forums/show...Type+all4nerds

  10. #10
    SitePoint Guru tombempty's Avatar
    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

  11. #11
    SitePoint Guru DocType's Avatar
    Join Date
    Feb 2005
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Tom, just tell it not to be bold.

    How's it going a4n?

  12. #12
    SitePoint Guru tombempty's Avatar
    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

  13. #13
    SitePoint Guru DocType's Avatar
    Join Date
    Feb 2005
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    O.K. so you want it that way, just not bold; Right?

  14. #14
    SitePoint Guru tombempty's Avatar
    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

  15. #15
    SitePoint Guru DocType's Avatar
    Join Date
    Feb 2005
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  16. #16
    SitePoint Evangelist lance_vincent's Avatar
    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.

  17. #17
    SitePoint Guru tombempty's Avatar
    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

  18. #18
    SitePoint Guru DocType's Avatar
    Join Date
    Feb 2005
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  19. #19
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by lance_vincent
    .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..

    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

  20. #20
    SitePoint Guru tombempty's Avatar
    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

Posting Permissions

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