mickt
asked on
How do I resize a .png file in dashboard?
Hi, I'm trying to resize logo.png as it is too large for the space in the dashboard.
greping for logo.png leads me to the following:
from 500.html:
div#container {
position: absolute;
top: 80px;
padding-top: 170px;
margin: 0px 0px 0px -196px;
left: 50%;
width: 390px;
background: url("{% static "dashboard/img/logo.png" %}") no-repeat scroll center 35px padding-box rgb(255, 255, 255);
border: 1px solid rgb(225, 225, 225);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3);
}
from _topbar.scss:
.topbar {
background: $gray-lighter;
border-bottom: 1px solid $gray-light;
padding-right: 15px;
h1.brand {
display: inline-block;
width: 222px;
margin: 0 0 0 10px;
line-height: 1;
a {
background: url(../img/logo.png) left center no-repeat;
display: block;
text-indent: -9999px;
}
}
I've never worked with this stuff before so assistance is required.
greping for logo.png leads me to the following:
from 500.html:
div#container {
position: absolute;
top: 80px;
padding-top: 170px;
margin: 0px 0px 0px -196px;
left: 50%;
width: 390px;
background: url("{% static "dashboard/img/logo.png" %}") no-repeat scroll center 35px padding-box rgb(255, 255, 255);
border: 1px solid rgb(225, 225, 225);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3);
}
from _topbar.scss:
.topbar {
background: $gray-lighter;
border-bottom: 1px solid $gray-light;
padding-right: 15px;
h1.brand {
display: inline-block;
width: 222px;
margin: 0 0 0 10px;
line-height: 1;
a {
background: url(../img/logo.png) left center no-repeat;
display: block;
text-indent: -9999px;
}
}
I've never worked with this stuff before so assistance is required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I decided to resize and rename so I'll use two files; easiest option by far. I still need to move the image the the left in the dashboard, i.e. remove the border.
You'll need to post the HTML for this snippet before we can help with style rules. Generally, you find a way to target the image's parent container (e.g., class, id, or other selector), then apply style to it. For example:
<!-- the styling -->
#my_image_container {
background-image: url('/my-image.png');
background-size: contain;
<!-- the HTML -->
<div id="my_image_container">
</div>
The CSS you posted is actually SCSS, which means you would need to add your rule then recompile.
ASKER
I resized and it fits perfectly; couldn't tweak using other method and I don't have enough time at the moment to figure it out.
ASKER