Priority of css styles tables?

ThemeBurn SupportForumsOpenCart ThemesShoppica 2 OpenCart ThemePriority of css styles tables?

This topic has been marked as resolved.

Hi,

I need to redifine some ids and classes from basic shoppica2 css table.
So I added my custom css table in the head of the page.

-head-

link rel=”stylesheet” type=”text/css” href=”/catalog/view/theme/shoppica2/stylesheet/screen.css.php?v=2.2.2…

link rel=”stylesheet” type=”text/css” href=”…/mycustomstyles.css
-/head-

And in mycustom.css I tried to redifine some ids and classes from basic shoppica2 css table.
So everything is quite normal and standart.

BUT somehow properties defined in base shoppica2 css are always main and all my modifications just redifine by shoppica2 css.

For me it is quite strange because my custom styles table is placed after shoppica2 css in head section but on practise shoppica2 properties are always on top.

What can I do with it? How to redifine it?
Please see attached image as example in google chrome web tools.

Thank you.

BR,
Nick

  • This reply was modified 4099 days ago by  nickkk.
  • This reply was modified 4099 days ago by  nickkk.
 nickkk
February 26, 2013 at 7:09 pm #19495

Hello Nick,

Generally this selector:

#ID .class {
}

has a greater priority than a class only selector:

.class {
}

Here is a nice slideshow about how the css cascade works: http://www.maxdesign.com.au/articles/css-cascade/

Best,
ThemeBurn team

February 28, 2013 at 4:37 pm #19608

Hi,

Yep, feel like a total fool. )
I know that id has higher priority then class.
I’ve just didn’t realize it was a pair. I read it as #ID, .class (with comma).

Anyway, thank you for answer even on this sily question.)

  • This reply was modified 4097 days ago by  nickkk.
 nickkk
February 28, 2013 at 8:08 pm #19620

It’s no problem, Nick :)

Best,
ThemeBurn team

March 4, 2013 at 11:37 am #19717
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.