Page 1 of 1

how to scale images on percentages?

Posted: Fri May 31, 2013 9:55 pm
by John Herdean

i want to scale an image based on % like you do with the grid cells. In the dimensions, I see Im only allowed to put in the value of the pixels. Is there a way to put in % for the dimensions of an image?


how to scale images on percentages?

Posted: Fri May 31, 2013 10:03 pm
by maxkatz

Right now it takes a number (pixels) only. You should be able to use % via JavaScript or a CSS class.


how to scale images on percentages?

Posted: Fri May 31, 2013 11:31 pm
by John Herdean

ok, well I did this css code and the width didnt expand with different screen sizes changed:

.personal-background {
width: 100%;
height:100px;
}

is there anything wrong with this css?


how to scale images on percentages?

Posted: Fri May 31, 2013 11:43 pm
by Alena Prykhodko

This code should work code.personal-background {
width: 100% !important;
height:100px;
} /code


how to scale images on percentages?

Posted: Sat Jun 01, 2013 12:02 am
by John Herdean

yes that worked.

Question? the '!important' property.... To me it looks like it takes priority when theres a similiar property name... In this case its 'width' since width was already in the dimensions of the image... Just wanted to know the meaning of '!important'


how to scale images on percentages?

Posted: Sat Jun 01, 2013 12:10 am
by Alena Prykhodko

In Dimensions there is a Default value of width, and it has priority, when you add !important in Custom CSS - your style will be used instead.