Custom css problem

Posted in: Newspaper
Post count: 54

I’ve noticed that not all custom css rules added to the theme panel actually work. For example, I tried to add a different padding to the class for a specifcit devie: .td-menu-wrap #td-top-menu and unfortunately, style.css takes priority in this case. I’ve added several other custom css rules which work with no problem.

Not sure what’s the priority, if I’d get a brief explanation it would be great.

Thanks!

Post count: 854

hi,
are you using ‘tagDiv speed booster’ plugin?
if you do then the css of the theme is moved after the custom css from theme panel (http://screencast.com/t/X9BD1NuXDP), and probably overwrite the custom one.

if you don’t use the ‘tagDiv speed booster’ plugin then you either don’t catch the object correctly or try to use the ‘ !important ‘ word, to overwrite the already executed css : http://www.smashingmagazine.com/2010/11/02/the-important-css-declaration-how-and-when-to-use-it/

Thanks for you message.
Radu A.

Post count: 54

Hey Radu,

I’m not using the speed booster plug and I’ll try using the !important rule. Will report back shortly, thanks!

Post count: 54

I’ve tried using !important, no success. The rules that I want to override are:

.td-menu-wrap #td-top-menu {
padding-left: 2px !important;
}

These are meant for the desktop 1200px. If I change the padding directly in style.css works with no problem – I copy paste that to Advanced CSS in the desktop 1200+ field, nothing happens. Not sure if this is a bug

Post count: 54

An update, if I place the css rules FIRST in the Advanced CSS Desktop box, they work with no problem. If ANY other rule, that has no relation with the id and div is placed before, it doesn’t work anymore.

Post count: 854

hi,
you can edit the style.css file (not recommended if you later update the theme).

the order is important for css, one rule can overwrite the other.

try find the correct order.

Thanks for you message.
Radu A.

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.