By Brian Tastic on
I'm trying to style my forums. I want to add styles to certain links, to make them look like buttons. Problem is I dont want to write the same styles for different classes. Some links have so many class childs, I don't know how to reference it, eg:
<div class="topic_links">
<div class="links"><span thmr_curr="1" style="outline: medium none;" id="thmr_14" class="thmr_call">
<ul class="links inline"><li class="comment_add first">
<a href="/springburst/comment/reply/62#comment-form" title="Share your thoughts and opinions related to this posting.">Reply to this post</a></li>
<li class="statistics_counter last"><span>229 reads</span></li>
In the example (firebug output) above, I have created a class div around the html to display links, within the my node-forum.tpl.php file: ie
<div class="topic_links">
<?php if ($node->links) { ?><div class="links"><?php print custom_links($node->links, 'post'); ?></div><?php } ?>
</div>
how do I reference the anchor tag UNDER my defined "topics_inks" div? and how do I prevent having to write the same 'button' style for different Drupal named link classes?
Comments
In CSS, you can refer to
In CSS, you can refer to
div.topic_links ato style anchor tags that are beneath a div of class topic_links.You shouldn't have to write the same button style for different named link classes - there will generally be something in common with similar bits of the page so that you can use one rule.
Thanks for your reply Julian.
Thanks for your reply Julian. I think I should have been clearer though. yes I want to style the links, but I think I need to style the div that contains the link to make it into a button, and in the example I've given above, that would be:
so can you show me an example CSS of how I would refer to that class? so lets say my default button style in the CSS file is:
Can anybody provide me with
Can anybody provide me with some guidance by example please?