Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3958374
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:36:08+00:00 2026-05-20T02:36:08+00:00

I want to create a tag cloud based on tags I assign to products.

  • 0

I want to create a tag cloud based on tags I assign to products. The idea being the more occurances of the tag the bigger the text in the tag cloud.

I have the code written which returns the tag text against the number of occurances but I’m not sure how to convert the weighting to a css class.

eg.

microwave 9 occurances 
tv 22 occurances 
pc 3 occurances
hi-fi 16 occurances
hdmi 1 occurance

I have created 8 css classes:

.size1 { font-size 8pt; }
.size2 { font-size 9pt; }
.size3 { font-size 10pt; }

etc.

so say I have 10 tags ranging from occurances 1 to 30 how could I assign them to my css classes. I also need this flexible so I could have any number of tags with any range of occurances.

I am using php as the scripting language so I don’t mind if the code is done in that or javascript / jquery which I am also using on my site

Can anyone give me any help or point me to a tutorial or code snippet which doe what I’m after?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:36:09+00:00Added an answer on May 20, 2026 at 2:36 am

    A nice guide to setting up tag clouds can be found at http://stevethomas.com.au/php/how-to-make-a-tag-cloud-in-php-mysql-and-css.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code here in order to create a tag cloud, the tags
I want to create 3d tag cloud which pic the tags from the XML
I am using acts_as_taggable to create a tag cloud for my application. I have
I'm trying to create a dynamic tag cloud using jquery, I want it to
I want to create a tag list for a Lucene document based on a
I want to create simple dummy tag which can work with Struts2. I have
I want to create a tag named <triangle> . And I want to add
I want to create a widget like Stack Overflow Tag Field. How to add
I have created an object at runtime by using innerHTML tag, now I want
I have a native Delphi TFrame that emulates Roy Tanck's Cumulus Tag Cloud viewer,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.