News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Icon in catagory

Started by Road Rash Jr., December 08, 2010, 02:31:55 PM

Previous topic - Next topic

Road Rash Jr.

Is there anyway to put an icon in with the catagory name?
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Hj Ahmad Rasyid Hj Ismail

Modify your category name and put something like this:
<img src="yourimageurl/yourimage.png or .gif or etc" alt="" /> General Category
Make sure your icon is very small and fit just right into the current size of your General Category Font Size or you will have to edit your index.css to make sure that the icon fit in nicely.

EDITED: Another way is by using html code for html image like this: or whatever you want.

Have fun trying!

Road Rash Jr.

Any idea what the pixel size would be for the height
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Hj Ahmad Rasyid Hj Ismail

I think around 12px more or less.

Road Rash Jr.

Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Hj Ahmad Rasyid Hj Ismail


Spoogs

actually about 24px should be fine... on topic view the icon to the left of 'Author' is 20px

Hj Ahmad Rasyid Hj Ismail

Quote from: Spoogs on December 08, 2010, 03:26:13 PM
actually about 24px should be fine... on topic view the icon to the left of 'Author' is 20px
Yeah. I may be wrong on the size. More correct, to say, follow your default theme Category Title size.

Road Rash Jr.

That's why I asked because I had no idea what the size was, 24 high looks like it will fit but I'll play with it thanks again
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Hj Ahmad Rasyid Hj Ismail

Some css code will use em, pt or px. In the case of default curve, I think it states the size as 1.2em. This is a good page for reading to understand more about them: http://kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/

Road Rash Jr.

I made the icons 28 pix high and there is a tinny space left at the bottom so I think I'll set them to 30  ;D
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Hj Ahmad Rasyid Hj Ismail

Glad to hear that it is working for you.

Road Rash Jr.

Yeah thanks a whole bunch guys, it's great to have some varity in the titles. Spruces it up some
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Hj Ahmad Rasyid Hj Ismail

Indeed it does... Indeed it does...

Advertisement: