Jump to content


Photo
Anything Boxes

Inline styles problem



Best Answer cmunns , 26 June 2013 - 02:13 AM

You actually can overwrite it with your own css but you need to use the !important tag like so :

 
.abboxgraphic img {
width: 22%!important;
}
Go to the full post


  • Please log in to reply
5 replies to this topic

#1 Willem-Siebe Spoelstra

Willem-Siebe Spoelstra

    Super Member

  • Members
  • 228 posts
  • LocationAlmere
  • Country: Country Flag

Posted 11 June 2013 - 08:50 PM

 
<div class="blocks box-media-pad" style="min-height: 235px;">

Hi Adam, the above is part of the HTML for the anything boxes. Why is here an inline style? I causes empty space in my boxes and I don't see the point from this min-height.

I have the anything boxes with one image on the left and only one box per row. The height of the div shouldn't be influenced by an inline style I was thinking.

 

Also there is an other rule.

 
<div class="abboxgraphic img " style="width: 22%; max-width:680px">

Last time I spoke with you via e-mail about this problem. Because the width (22%) is set with an inline style, I cant get my image as big as i would like to have it.

 

Can you maybe add classes in your coding instead of inline style so we can override this with our own CSS?

 

Hope to hear from you.

 

Kind regards,

 

Willem



#2 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts
  • Country: Country Flag

Posted 14 June 2013 - 10:27 PM

I can't write options that transfer directly over to a css file so this is how the output/style can get modified based on the options from the theme. Definitely will move to add some custom less actions, but this is less of a priority at the moment. I hate inline styles, but in a cms you are always going to come across a couple here and there.



#3 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts
  • Country: Country Flag

Posted 14 June 2013 - 10:28 PM

with that said you don't need to override with your own css here because it's controlled by an option in the section.



#4 Willem-Siebe Spoelstra

Willem-Siebe Spoelstra

    Super Member

  • Members
  • 228 posts
  • LocationAlmere
  • Country: Country Flag

Posted 15 June 2013 - 07:44 AM

Hi Adam, on all the other post I liked and marked your answers as solved. Don't think all 'thank you' replys will benefit the discussion there, but I'm really thankfull for making the changes that quick!

 

The reason why I do respond here, is that I don't fully understand what you are saying, probably because my lack of english knowledge.

 

What I (think) I see with plugins from for example Jetpack, the sharebar plugin, it loads all CSS but I can overwrite it in my own CSS/LESS file inside my pagelines theme (being more specific).

 

I don't understand what you are saying with:

 

 

 

I can't write options that transfer directly over to a css file

 

As far as my knowledge from CSS/LESS goes I can't use the 'abboxgraphic img' class to overwrite the inline style width = 22%, what means that I'm always limited in how big the image will be.

 

I hope I managed to explain myself a little bit better, I hope you want me to explain it one more time also ;-).

 

Kind regards,

 

Willem



#5 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts
  • Country: Country Flag

Posted 26 June 2013 - 02:13 AM   Best Answer

You actually can overwrite it with your own css but you need to use the !important tag like so :

 
.abboxgraphic img {
width: 22%!important;
}

  • Willem-Siebe Spoelstra likes this

#6 Willem-Siebe Spoelstra

Willem-Siebe Spoelstra

    Super Member

  • Members
  • 228 posts
  • LocationAlmere
  • Country: Country Flag

Posted 28 June 2013 - 07:34 PM

Awesome, thanx for this lesson ;-).







Also tagged with one or more of these keywords: Anything Boxes