Tagged: x
-
AuthorPosts
-
April 8, 2016 at 10:05 am #872949
Hi there. I have a site that will change logos on mobile http://609.459.myftpupload.com/. (from a horizontal logo to a vertical logo). I’ve put in the following code (below) and it works fine however I’d like to center the mobile logo yet can’t seem to figure it out. Any suggestions would be most helpful.
Thanks!
@media (max-width: 979px){
a.x-brand.img img {
display:none;
}a.x-brand.img {
display:block;
background:url(‘http://609.459.myftpupload.com/wp-content/uploads/2016/04/dfilogo-RGB-stacked-tag.jpg’) top left no-repeat;
width:300px;
height:327px;
}April 9, 2016 at 12:31 am #873765Hi There,
Thanks for writing in! Please update your code to this:
@media (max-width: 979px){ a.x-brand.img img { display:none; } a.x-brand.img { display:block; background:url('http://609.459.myftpupload.com/wp-content/uploads/2016/04/dfilogo-RGB-stacked-tag.jpg') top left no-repeat; width:300px; height:327px; margin-left: auto; margin-right: auto; } }
Hope it helps, Cheers!
April 9, 2016 at 8:03 am #874113That worked perfectly, thank you! One last question, I’d like to center the text div below the logo on Mobile, Now it’s appearing on the left side. Can you help me center that the text (#headertext):
@media (max-width: 979px){
a.x-brand.img img {
display:none;
}a.x-brand.img {
display:block;
background:url(‘http://609.459.myftpupload.com/wp-content/uploads/2016/04/dfilogo-RGB-stacked-tag.jpg’) top left no-repeat;
width:300px;
height:327px;
margin-left: auto;
margin-right: auto;
}#headertext {
float: none;
display:inline-block;
}
}April 9, 2016 at 11:28 am #874293Hi There,
Please change:
#headertext { float: none; display:inline-block; }
To:
#headertext { float: none; display: block; text-align: center; }
Hope it helps 🙂
April 9, 2016 at 11:31 am #874295Perfect as always, thank you so very much!
April 10, 2016 at 1:00 am #874834You’re welcome.
-
AuthorPosts