Archived topic
How to style tags and tag cloud?
13 replies · Started by Antonio on February 16, 2016
How to style tags and tag cloud? I see that they are a.tag-link-1 a.tag-link-2 a.tag-link-3...
how?
Thanks
What are you trying to change?
If it's font sizes, you'll need to do something like this: https://gist.github.com/generatepress/0e9722eb49ddad91ee5d
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Just color, padding and background color.
You can do something like this:
.tagcloud a {
padding: 10px;
background: red;
color: white;
}
Hy, and is there a way, by css, to have the same dimension of the various tag? Or is it possible to choose this setting somewhere? I have a particular interest in tag cloud products (woocommerce), but it is also useful for tag cloud in general.
Thank's
Hi there,
So like a fixed width? What would happen if the tag is wider than the set width?
No, I meant the possibility to have the font size fixed and to leave to the number of articles the information about the amount of occurrences
Hi there,
are you able to share a link to your site so we can make sure the correct CSS is given?
Oh yes, but the site is on development online, on a new server, and you have to set your local dns in the hosts file if you want to see it, I put the IP number below.
I'd like to keep the same tag size like here, in the second example: https://wordpress.com/support/widgets/tag-cloud-widget/
is there any particular post where i can see the Tag Cloud ?
The tag cloud is in the top bar, visible on every page of the theme (seller)
Oh my - how did i miss that :)
Try this CSS - i have added some extra styles for the border as per the example:
.tagcloud a.tag-cloud-link {
font-size: 12px !important;
/* extra styles */
padding: 5px;
border: 1px solid #777;
border-radius: 5px;
}
Thank you! It worked very well!
Glad to be of help