- This topic has 10 replies, 3 voices, and was last updated 9 years, 10 months ago by Tom.
-
AuthorPosts
-
March 8, 2015 at 6:36 am #83943Siong Boon Lim
Hi Tom,
Is there a way to add an additional header on the very top of the page?
Like this website, http://premierbus.com.sg
where they put the small wording for telephone number and email on the very top right of the menu.How do I achieve that additional top header bar?
Thank you.
March 8, 2015 at 7:26 am #83951Dee BroughtonHi,
I’m not sure how that site is doing it, but on a number of my sites, I’ve done something similar, either at the top, like here vidyablog.com, or at the bottom. They are created with plugins. I’ve used WP Front Notification Bar which is the one on that site, but lately I’ve preferred GC Message Bar. Both are good and both could be stationary or can be animated, etc. You can create styles with CSS so they look however you want.
March 8, 2015 at 10:27 am #84029TomLead DeveloperLead DeveloperI would personally use GP Hooks.
Something like this in the “Above Header” hook:
<div class="above-header-bar"> <div class="grid-container grid-parent"> Top bar content in here </div> </div>
Then some CSS:
.above-header-bar { padding: 10px; background: #7CC68D; color: #FFF; text-align: right; }
March 9, 2015 at 12:18 am #84199Siong Boon LimThank you Tom.
This is what I am looking for.Just to be precise, I use the GP hook “Before Header”
March 9, 2015 at 12:31 am #84204Siong Boon LimHi Tom,
I still fail to align the text with css.
Seems that the object selector is incorrect
I try “grid-container” but my header text moved.How do I select the of the “grid-container” of the “.above-header-bar”?
Thanks.
March 9, 2015 at 10:49 am #84354TomLead DeveloperLead DeveloperI’m not sure what you mean?
grid-container
will make it so the width of the your content in that bar matches the width of your website container.What about it isn’t working?
March 9, 2015 at 4:41 pm #84449Siong Boon LimI tried the following, cannot work.
.above-header-bar {
padding: 10px;
background: #7CC68D;
color: #FFF;
text-align: right;
}I tried the following, can work but it also shifted other element,
.above-header-bar grid-container {
padding: 10px;
background: #7CC68D;
color: #FFF;
text-align: right;
}Maybe I did something wrong somewhere.
I will setup the wordpress website one day so that you can take a look.
Currently it is running a static HTML site at http://www.pic-control.comMarch 9, 2015 at 11:21 pm #84565TomLead DeveloperLead DeveloperIt would be great if I could see the site to know what was going on.
Let me know when you have it set up ๐
March 13, 2015 at 6:11 am #86252Siong Boon LimHi Tom,
Thank you. I have enable the website for these 3 days.
Looking forward to your help.
http://www.pic-control.comI am able to change font size, color.
but it cannot align right.Thank you very much.
Siong BoonMarch 13, 2015 at 6:25 am #86260Siong Boon LimHi Tom,
I found the issue using the style inspector from firefox web-browser
There was this code in my css which over-writes the .above-header-bar
.grid-container
{
text-align:left;
}Forgotten why I put in the .grid-container for….
After I remove it, your codes works perfectly.
Thank you.March 13, 2015 at 9:23 am #86352TomLead DeveloperLead DeveloperAwesome! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.