resize image in percent

User 115757 Photo


Registered User
7 posts

Autum Template:
Original logo image is 334 pixels by 67 pixels
in CSS
#logoTxt {
background: url(../images/logo.png) top right no-repeat;
background-size: contain;
position: absolute;
top: 0px;
left: 1.041666666667%; /* 10/960 */
width: 34.791666666667%; /* 334/960 */
height: 167px;
border: none;
padding-bottom: 40px;
}
I want to change to a new logo 543 pixels by 154 pixels.
How do I adjust the code to reflect te new logo size (logo.png)
User 115757 Photo


Registered User
7 posts

Opps height: 67px;
User 122279 Photo


Senior Advisor
14,453 posts
Online Now

The body width of the template is 960px, so that is 100%.
You need to divide the image (logo) width by the body width to find out how many % it takes up.
This is the maths: 543 / 960 * 100
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.