John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to scale images on percentages?

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?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

how to scale images on percentages?

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

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to scale images on percentages?

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?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

how to scale images on percentages?

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

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to scale images on percentages?

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'

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

how to scale images on percentages?

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.

Return to “Issues”