Solved

style menu wordpress

Posted on 2014-02-23
18
466 Views
Last Modified: 2014-02-27
Hi

In wordpress theme twenty fourteen I want to style the vertical  menu links .
To do this I need to go to the style.css sheet and select what tag to style them?
0
Comment
Question by:jagguy
  • 7
  • 6
  • 3
  • +1
18 Comments
 
LVL 17

Expert Comment

by:nanharbison
Comment Utility
Are you using the addon to Firefox called Firebug? If you install that, you can right click on any element on your page and see the html and CSS. And then it lets you add styles to the CSS. I use to determine which html element is using which CSS rule. If I add styles to the CSS of what I think will change the menu color or size or font or something, and it doesn't work, that means I am not changing the right thing. You can also mouse over the html on the left and Firebug will highlight that element on the page.
0
 
LVL 17

Expert Comment

by:nanharbison
Comment Utility
Also, can you give us a link to what you are doing so we can show you what needs to be changed?
0
 

Author Comment

by:jagguy
Comment Utility
I am developing on my PC.
0
 
LVL 17

Expert Comment

by:nanharbison
Comment Utility
Do you know how to use Firebug? We can walk you through it.
0
 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
Please make a screenshot of your page (menu) and indicate what you want to change the styling for.
0
 

Author Comment

by:jagguy
Comment Utility
Hi,

not only do i want the links styles but the background color wont change .

I want my links, and background color to look like  this so I dont need much

http://www.eternea.org/
ss.docx
0
 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
You can start by adding this to your styles.css

ul li a {
  background-color: #141414;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjUwRTNGNUIzNDhBMjExRTI5MjY0Q0ZBRDcxOTYxNUNFIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjUwRTNGNUI0NDhBMjExRTI5MjY0Q0ZBRDcxOTYxNUNFIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTBFM0Y1QjE0OEEyMTFFMjkyNjRDRkFENzE5NjE1Q0UiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NTBFM0Y1QjI0OEEyMTFFMjkyNjRDRkFENzE5NjE1Q0UiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6JCXrGAAAANElEQVR42mIwMrL6z8TAwPAXlfiDyvqNykIjfqGyiCB+4uL+JMUUNMvRCDSHo3nrL0CAAQBzOzIE69Ar8wAAAABJRU5ErkJggg==");
  color: #FFFFFF;
  display: block;
  font-family: Helvetica,Arial,Verdana,Sans-serif;
  font-size: 12px;
  line-height: 180%;
  padding: 13px 20px;
}

Open in new window

0
 
LVL 28

Expert Comment

by:chilternPC
Comment Utility
Wordpress provide  plugins for the twenty fourteen theme to allow you to change lots of items without messing with the code.

i.e  changing colours and style the other for change nearly everything else.

you can download them directly from your wordpress admin site into your site from the admin page:
go to Plugins - Add New then search for "twenty fourteen" and they are the first 2 plugins, install and activate.

see details or download them here..

https://wordpress.org/plugins/fourteen-colors/

http://wordpress.org/plugins/fourteen-extended/
0
 

Author Comment

by:jagguy
Comment Utility
ok the code works find , but I dont get the line

  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..........

Also just changing the white foreground color in the content should not require a plugin but a line if css, shouldnt it?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
The background-image is taken straight from your reference site.

Instead of referring to an external image file - the raw PNG data is encoded into the style itself.

Also just changing the white foreground color in the content should not require a plugin but a line if css, shouldnt it?
Exactly! - world has gone plugin mad - downloading megabytes of plugin to do the simplest things.
0
 
LVL 28

Expert Comment

by:chilternPC
Comment Utility
if you are just changing the code and not creating a child theme,
be careful about any updates to that theme as your changes could get overwritten
0
 

Author Comment

by:jagguy
Comment Utility
The background-image is taken straight from your reference site.

Instead of referring to an external image file - the raw PNG data is encoded into the style itself.


Could you please tell me how to get this from the reference site. It is quite clever.
However the hover color is greenish over the link and I dint want this, and they horizontal menu on my website gets effected and I dont want that either.

Where do I get rid of the green color?
ss2.docx
0
 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
If you are using FireFox with Firebug or Chrome you can simply right click on the element and select Inspect Element - this will give you a console window from where you can inspect html , css and script.

Not sure where the green comes from - does not appear to be on the eternea site. The background in question is a 1x50px gray gradient image (see attached)
bg.png
0
 

Author Comment

by:jagguy
Comment Utility
So if I right click on the element I dont see the below code in bold

background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA

As for the green color , I want to get rid of it but I cant see anywhere where this color is set.
0
 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
So if I right click on the element I dont see the below code in bold
FF or Chrome?
0
 

Author Comment

by:jagguy
Comment Utility
FF, I see the element but the code you got


background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA
0
 
LVL 51

Accepted Solution

by:
Julian Hansen earned 500 total points
Comment Utility
The right click the menu item in the vertical menu on the left (say Home) and select Inspect Element

In the console window make sure the <a href="index.aspx"> is selected.

In the Style panel on the right you should see the style
#cssmenu > ul > li.active a {
  background-color: #070707;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjUwRTNGNUIzNDhBMjExRTI5MjY0Q0ZBRDcxOTYxNUNFIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjUwRTNGNUI0NDhBMjExRTI5MjY0Q0ZBRDcxOTYxNUNFIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTBFM0Y1QjE0OEEyMTFFMjkyNjRDRkFENzE5NjE1Q0UiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NTBFM0Y1QjI0OEEyMTFFMjkyNjRDRkFENzE5NjE1Q0UiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6JCXrGAAAANElEQVR42mIwMrL6z8TAwPAXlfiDyvqNykIjfqGyiCB+4uL+JMUUNMvRCDSHo3nrL0CAAQBzOzIE69Ar8wAAAABJRU5ErkJggg==");
  background-repeat: repeat-x;
  box-shadow: 0 0 3px #000000 inset;
}

Open in new window

see attached screenshot
firebug.jpg
0
 

Author Comment

by:jagguy
Comment Utility
ok I see this but on my wordpress see below displays the rollover image with much more white  on the link so it doesnt display the same.
ss3.docx
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now