Mobile header

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sat Nov 01, 2014 1:13 pm
Reply with quote
Report this post
Hi,

I got this banner on postion bannertop. Only the banner will disappears when you visit the website by mobile.
Can I get it also when people visit the mobile website?

link
User avatar
Expert Boarder

GK User
Mon Nov 03, 2014 7:14 am
Reply with quote
Report this post
The banner can be shown but what is more important - you then would need to decide how it should look.
You will have 3 big elements - logo, banner and login - they need to fit together somehow.
Please create a mockup of how should it look like an I will try to help.
User avatar
Moderator

GK User
Mon Nov 03, 2014 7:55 am
Reply with quote
Report this post
Hi,

It's no problem to lose the logo and place the header instead.

See below, left is original with logo, right is how I want it (without logo but with header).

Image Image

tnx in advance
User avatar
Expert Boarder

GK User
Mon Nov 03, 2014 2:35 pm
Reply with quote
Report this post
The logo can also go under the mainbody module....or better, in the sidebar if that's possible.

Image

funkiej wrote:Hi,

It's no problem to lose the logo and place the header instead.

See below, left is original with logo, right is how I want it (without logo but with header).

Image Image

tnx in advance
User avatar
Expert Boarder

GK User
Tue Nov 04, 2014 12:47 pm
Reply with quote
Report this post
Please edit: /templates/gk_magazine/css/override.css and add at its end:
Code: Select all
@media (max-width: 1030px) {
    #gkBannerTop {
        display: block !important;
    }
    #gkLogo {
        display: none;
    }
}


This is closest I can get without bigger changes.

Remember to enable "CSS override" in template settings - advanced section.
User avatar
Moderator

GK User
Tue Nov 04, 2014 1:37 pm
Reply with quote
Report this post
tnx!!!

Is it possible to have the logo in the toolbar when the width hasn't reached 1200px (I changed it to 1200 instead of 1030)?
User avatar
Expert Boarder

GK User
Wed Nov 05, 2014 4:34 pm
Reply with quote
Report this post
Yes, please try this media query code:
Code: Select all
@media (max-width: 1175px) {
    #gkBannerTop {
        display: block !important;
    }
    #gkLogo {
        position: absolute;
        top: 0px;
        left: 0px;
        margin: 0px;
        max-width: 52px;
    }
    #gkToolbar {
        top: 78px;
    }
}
User avatar
Moderator

GK User
Wed Nov 05, 2014 4:55 pm
Reply with quote
Report this post
Whut?! You're great! Tnx a lot :D

Only when I view the 'mobile' site in potrait mode..the logo is bigger then the toolbar. In landscape mode it fits perfectly.

Cyberek wrote:Yes, please try this media query code:
Code: Select all
@media (max-width: 1175px) {
    #gkBannerTop {
        display: block !important;
    }
    #gkLogo {
        position: absolute;
        top: 0px;
        left: 0px;
        margin: 0px;
        max-width: 52px;
    }
    #gkToolbar {
        top: 78px;
    }
}
User avatar
Expert Boarder

GK User
Wed Nov 05, 2014 5:25 pm
Reply with quote
Report this post
Please try changing:
Code: Select all
max-width: 52px;

to 40px value.
User avatar
Moderator

GK User
Wed Nov 05, 2014 5:57 pm
Reply with quote
Report this post
tnx, this did the trick :)

Only when the gklogo hover is to big. When u go with your mouse over the logo a big green bar appear. I don't need a gkLogo hover. See screenshot

Image
User avatar
Expert Boarder

GK User
Wed Nov 05, 2014 6:01 pm
Reply with quote
Report this post
Complete solution:
Code: Select all
#gkLogo:hover {
    background-color: transparent;
}

@media (max-width: 1175px) {
    #gkBannerTop {
        display: block !important;
    }
    #gkLogo {
        position: absolute;
        top: 0px;
        left: 0px;
        margin: 0px;
        max-width: 52px;
    }
    #gkToolbar {
        top: 78px;
    }
}
User avatar
Moderator

GK User
Wed Nov 05, 2014 6:27 pm
Reply with quote
Report this post
tnx!
User avatar
Expert Boarder

GK User
Wed Nov 05, 2014 6:27 pm
Reply with quote
Report this post
No problem :).
User avatar
Moderator

GK User
Thu Nov 06, 2014 8:45 am
Reply with quote
Report this post
Is it possible to have 2 variables in max width?

Code: Select all
@media (max-width: 1175px) {
    #gkBannerTop {
        display: block !important;
    }
    #gkLogo {
        position: absolute;
        top: 0px;
        left: 0px;
        margin: 0px;
        max-width: 52px;
    }
    #gkToolbar {
        top: 78px;
    }
}


I also want if the 'max-width' is< 580 the width of #gkLogo must be 40px.

This is because the toolbar has 2 differtent thickness (on mobile 40px and tablet 52px) :roll:

edit:
I've added this code in overide.css and it works now ! :D
Code: Select all
@media (max-width: 580px) {
    #gkLogo {
        position: absolute;
        top: 0px;
        left: 0px;
        margin: 0px;
        max-width: 40px;
    }}
User avatar
Expert Boarder

GK User
Fri Nov 07, 2014 5:44 pm
Reply with quote
Report this post
You can use range defined with max-width and min-width but rwd practice shows that it is better not to use ranges but progressively add other layout elements when more of browser size is available.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.