Tagged: header
- This topic has 8 replies, 3 voices, and was last updated 8 years, 3 months ago by Sakin.
-
AuthorPosts
-
December 10, 2015 at 11:48 am #80926Mandala528Participant
Hi,
I would like to add a phone number to the header, preferably above the dropdown menu in the top right corner, but without adding another header.
The Header Right Sidebar widget actually places text in the middle of the Header and that does not work because it pushes my logo higher up and out of alignment.
If I use the Header Top Sidebar widget, it gets put way up top and out of sight with it’s own header so that doesn’t work.
Do I have an alternative? My site is:
http://dev.stoneagect.com/Thank you for your help!
-Mandala528December 10, 2015 at 1:38 pm #80929PratikKeymasterHi @Mandala528,
This is little advance question and I would like to leave this to be answered by Sakin. He is on travel for WordCamp US. So, you might get reply little late.December 10, 2015 at 5:51 pm #80939SakinKeymaster@Mandala528: I see that you have already added in Phone number in header top sidebar. Then you can add the following css in “Appearance => Theme Options => Custom CSS” box to make that bar white, text align right and remove padding. I hope this works for you.
#header-top { background-color: #fff; } #header-top .container { padding-right: 35px; text-align: right; } #masthead { padding-top: 0; }
January 7, 2016 at 5:23 am #82350Mandala528ParticipantHi Sakin,
Thank you; that does work!
However, in responsive for mobile, the number gets pushed above the logo. Is there a way to move it to the right of the logo in responsive for mobile viewing?
Your help is appreciated!
Namaste,
Mandala528January 7, 2016 at 8:23 am #82361SakinKeymaster@Mandala528: If if you want to do that then, you need to add that phone number in Header Right Sidebar instead of Header Top Sidebar.
January 16, 2016 at 3:24 am #82980Mandala528ParticipantHi Sakin,
I had already tried that, but didn’t like how close it was to my main navigation.
This is a better place for it because it does not disappear when you scroll down like it did when i used “Top Sidebar.”I would prefer if the number was more centered between the logo and the dropdown menu. Is there a padding code I can use to accomplish this?
Also, the number disappears when viewed in mobile. Is there a code I can enter to prevent that from happening?
Thank you,
Mandala528January 16, 2016 at 8:50 pm #83014SakinKeymaster@Mandala528:
1. For padding, following is the example on how you can add in padding left and right as per your need. So, change it as per your need and then add it in your Custom CSS box:#header-right #text-5.widget { padding-left: 2px; padding-right: 5px; }
2. For mobile view to show phone number, you can add the following css in your custom css box:
@media screen and (max-width: 980px) { #header-right #text-5.widget { display: block; padding: 0; } #header-left { width: 100%; } #header-right { width: 100%; } }
January 16, 2016 at 11:50 pm #83020Mandala528ParticipantHi Sakin,
The code you supplied forced the contact number and dropdown menu below the logo so it does not all fit in one even line. Is there a way to push the logo farther to the left to make it all fit?
Thanks for trying,
Mandala528January 17, 2016 at 10:31 pm #83100SakinKeymaster@Mandala528: Now for that you can change the width as per your need. in the above css change the width of header-left and header-right. It’s now 100%. Change it as per your need.
-
AuthorPosts
- The topic ‘Header Space for Phone Number’ is closed to new replies.