Tagged: masthead purity
-
AuthorPosts
-
December 30, 2017 at 2:51 pm #1083925
i have 1 logo image centered in masthead .
it seems centered, but when I reduce the browser window to simulate the vision in the mobile version the image of the logo is not centered.
The source code of my masthead is this:
<div class="jumbotron jumbotron-primary masthead"><img class="img-responsive" style="display: block; margin-left: auto; margin-right: auto;" title="x" src="images/logo/logo-head.png" alt="x" width="480" height="114" /></div>
The custom css is this:
/* Custom CSS */ /* padding masthead all */ .page-masthead .row-feature { padding: 10px 0; } /* color masthead my */ .page-masthead .row-feature-primary-my { background: #f7f7f7 none repeat scroll 0 0; color: #bbe6ff; }
What should I do to get the image centered even in the mobile version?
Thanks so much.
- This topic was modified 6 years, 11 months ago by digitalmedia.
- This topic was modified 6 years, 11 months ago by digitalmedia.
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 2, 2018 at 2:26 am #1084162Hi
If you defined the image width in the style it will follow the same for all views.
Kindly make it 100% width so it will be responsive Also share the URL of the site so i can check it for you.Regards
January 2, 2018 at 6:13 pm #1084319Thanks for the reply
I tried on the local host.
first I tried to remove width and height with the following masthead source code
<div class="jumbotron jumbotron-primary masthead"><img class="img-responsive" style="display: block; margin-left: auto; margin-right: auto;" title="x" src="images/logo/logo-head.png" alt="x" /></div>
then I tried to set only widht to 100% with the following mastehad source code
<div class="jumbotron jumbotron-primary masthead"><img class="img-responsive" style="display: block; margin-left: auto; margin-right: auto;" title="x" src="images/logo/logo-head.png" alt="x" width="100%" /></div>
the problem remains, the masthead image is not centered in the mobile vision.
You can see my masthead in this url xxx
now on line i have removed image width and height from the source code.
thank you very much for the time you are dedicating to me and happy new year.
- This reply was modified 6 years, 11 months ago by digitalmedia.
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 3, 2018 at 1:46 am #1084362Hi
Open template folder /css/custom.css file and add below code@media screen and (max-width: 767px){ .page-masthead .jumbotron { padding-left: 0px!important;}}
save code, clear cache and check.
Regards
January 4, 2018 at 10:44 am #1084743I checked it, this latest solution work fine for me.
Thank you so much I would never have succeeded on my own.
Regards
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 5, 2018 at 1:39 am #1084893You are welcome!
-
AuthorPosts
This topic contains 5 replies, has 2 voices, and was last updated by Pankaj Sharma 6 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum