PHP and CSS Help! … I'm lost with IF {echo}
-
Basically I want to display a list of categories at the bottom of my post like :
Categories: category1, category2, category3
—————————————-
I had a hard time getting <span> to work with the “IF” statement, so I used an “echo” around it.if (is_single()) { echo '<span class="cats">'.the_category(' • ').'</span>';
Problem is it displays like this instead:
category1, category2, category3 Categories:
—————————————–
This is what I have in my CSS:.cats { background: transparent url(images/categories.gif) 0 1px no-repeat; margin: 0; padding-left: 25px; padding-bottom:5px; font-family: Tahoma, Geneva, Verdana, sans-serif; color: #888; font-size: 12px; content: "Categories: "; } .cats:before { content: "Categories: "; }
I’m not that good with PHP or CSS (still learning), and would appreciate any help I can get right now.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘PHP and CSS Help! … I'm lost with IF {echo}’ is closed to new replies.