Jump to content

Trying to change the size and position of my logo on the mobile theme


Johnny2525

Recommended Posts

Hi Johnny,

 

As you have caching on your store, it's hard to tell what file the css resides in, but my guess here would be the global.css file.

 

You will not be able to do much about the size of your logo on mobile as the image currently is, as your logo is over 1000pixels wide and 140pixels high. Your solution here would be to make a version of the logo that only encapsulates your logo and leave the black edges to CSS via background-color on the container. This is because the styling by default will retain the proportions of your image so that it doesn't skew. Your other option would be to use jQuery to do an image replace under a certain resolution.

 

Example:

if ($(window).width() < 468) {
$("#header_logo img.logo").attr("src", "http://newimagepath.com/image.png");
}

Positioning you can use the following code in order to achieve this.

header .fixed_width {
    margin: 0;
    width: 100%;
}

@media only screen and (max-width: 1000px) {
#header_logo img {
    margin-top: 0;
}
}

 This will return the following results (see attachments).

 

Many thanks,

 

Ant.

post-269828-0-43538600-1474013685_thumb.png

post-269828-0-95951600-1474013694_thumb.png

post-269828-0-16912900-1474013710_thumb.png

Edited by PrestashopUK (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...