0

Wanted to use a custom css option, instead of modifying the source code.Is there any possibility to override these css values please ?

@media only screen and (min-width: 40.063em) {
  .footer-fixed #wrapper [role="main"] {
    padding: 80px 60px 60px;
  }
}

not to sure how to apply !important in order to have :

@media only screen and (min-width: 76.5625em) {
  .footer-fixed #wrapper [role="main"] {
    padding: 80px 8px 20px 30px;
  }
}

thank you,

typo_
  • 11
  • 2
  • 15
  • 37
  • the syntax is correct you don't have to use !important – ZEE Mar 06 '15 at 19:24
  • thank you for your reply. just wanted to be sure that I was understood correctly .I don't want to replace the first css code with the second one shown above, directly in the source file, but to use a custom css field in order to override these values. As far as I know , this could be possible only if I use !important rule. thanks – typo_ Mar 06 '15 at 19:32
  • you css will not be instantly changed until the min-width reach 76.5625em !! – ZEE Mar 06 '15 at 19:36
  • Thank you, it works without !important too. noob question is it wrong with !important ? :D the loading time will be longer ? – typo_ Mar 06 '15 at 20:00
  • it's the same with !important and without it in this case , but in general cases have avoid using !important , more more clarification http://stackoverflow.com/questions/3427766/should-i-avoid-using-important-in-css – ZEE Mar 06 '15 at 20:03
  • all clear now, thank you.I really appreciate it !! :) ps: is there any posibility to choose both answers as solution ? – typo_ Mar 06 '15 at 20:06
  • choose the answer of @dowomenfart as solution i'm not answering i'm commenting here :) – ZEE Mar 06 '15 at 20:08

1 Answers1

0

This is how you would apply !important. Read up more about !important

@media only screen and (min-width: 76.5625em) {
  .footer-fixed #wrapper [role="main"] {
    padding: 80px 8px 20px 30px !important;
  }
}

Also, if you are in the same stylesheet as the first selector and declartion block you could add this CSS below it and it should override it without !important.

dowomenfart
  • 2,803
  • 2
  • 15
  • 17
  • It works . Thank you , I thought that I should use the !important rule on the min-width line too somehow. The strange thing is that it works without important too ... as Ze told me above :) at this point I'm pretty confused, not so sure what is the best answer and why ... – typo_ Mar 06 '15 at 20:02
  • I wouldn't recommend using !important because it could get sloppy. That's why I also had an alternative way without using !important. – dowomenfart Mar 06 '15 at 20:06
  • I understand. I'm not in the same stylesheet I try to override using an extra css field .thank you once again, I'll use the code without !important. – typo_ Mar 06 '15 at 20:11