Advertisement:

Author Topic: [Tutorial] Bolded Category Names, (Not Sub Categories)  (Read 3062 times)

chewyluke

  • Full Member
  • ***
  • Posts: 208
[Tutorial] Bolded Category Names, (Not Sub Categories)
« on: May 22, 2014, 04:41:40 pm »
I've been looking around the forums trying to figure out how to fix the dropdown search for Categories on Bender, (I use Bender I do not know if this will work on any other theme).

After piecing together different suggestions from various members, this is what I've been able to do.

***NOTE*** This does appear differently in various browsers. The categories will be bold in Firefox, but in Chrome and IE the categories will be a different color, (that's good enough for me unless anybody can fix that).

Open /oc-content/themes/Bender/css/main.css

At the very end of the css, add this. You'll have to edit the child #number values to match your own categories.

Code: [Select]
#sCategory { background-color: #ff0; }

option:nth-child(2), option:nth-child(4), option:nth-child(10), option:nth-child(16), option:nth-child(21), option:nth-child(26), option:nth-child(32), option:nth-child(37), option:nth-child(43), option:nth-child(62) {
    font-size: 14px;
    color: blue;
    font-size: 16px;
    font-weight: bold;
}

The first image is Firefox result, the second image is IE and Chrome result
« Last Edit: May 29, 2014, 07:28:29 pm by chewyluke »

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: FIX: Bolded Category Names, (Not Sub Categories)
« Reply #1 on: May 22, 2014, 08:48:38 pm »
good puzzle you put together :-)

try font-weight 100 or 200 or 300 upto 900

chewyluke

  • Full Member
  • ***
  • Posts: 208
Re: FIX: Bolded Category Names, (Not Sub Categories)
« Reply #2 on: May 22, 2014, 08:54:17 pm »
Thanks @design. I saw a lot of different people asking about it, and I too wanted to change it. This did it.

I tried all variations of font weight. Nothing changes in IE, Chrome or Safari. It's just the different color not bold. So I just set to bold instead of number.

chewyluke

  • Full Member
  • ***
  • Posts: 208
Re: FIX: Bolded Category Names, (Not Sub Categories)
« Reply #3 on: May 22, 2014, 09:39:36 pm »
Everything I'm reading online about CSS bold definition all lead back to <DOCTYPE> and why bold will work in one browser but not others. But I check the <DOCTYPE> in header.php and it seems like it's correct.

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: FIX: Bolded Category Names, (Not Sub Categories)
« Reply #4 on: May 22, 2014, 10:43:55 pm »
depending on your theme, doctype could be in more then one file-besides the header.

thanks for the heads up, I never knew that. I thought html5 was supposed to have been accepted by all browsers -- sigh  ::)

Pavanc

  • Newbie
  • *
  • Posts: 17
Re: [Tutorial] Bolded Category Names, (Not Sub Categories)
« Reply #5 on: September 14, 2014, 08:18:56 am »
Use funtion.php file. It's simple method.

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [Tutorial] Bolded Category Names, (Not Sub Categories)
« Reply #6 on: September 14, 2014, 04:21:22 pm »
This is an ongoing issue users were asking on Google's forums for years, it does not fully support custom dropdown list styles, while Firefox has a full support (and seems the only browser that does as far as I tested some other less known).

jkachhara

  • Newbie
  • *
  • Posts: 40
  • Bigbro.in
Re: [Tutorial] Bolded Category Names, (Not Sub Categories)
« Reply #7 on: February 18, 2015, 09:35:19 pm »
how can we change the color for sub-sub category???