Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   How to use images for page menu items? (http://forum.bytesforall.com/showthread.php?t=14300)

pierrebk4 May 23, 2011 03:45 PM

How to use images for page menu items?
 
I'm trying to use images for page menu items, so that I can use a client specified font that most pc's don't have. And I'm having trouble with how to tell ata to grab certain images for each page button on the menu bar.

From another thread (http://forum.bytesforall.com/showthread.php?t=10531) I learned to create a WP custom menu, and to assign a class to each menu item. But I can't get the image assigned to the menu item.

I've tried using the class name for the menu item as in:
Code:

#pmabout {background: url(http://www.lorensquires.com/workwithlorensouth/wp-content/uploads/about-button.jpg);}
And I've tried the menu item as in:
Code:

#menu-item-117 {background: url(http://www.lorensquires.com/workwithlorensouth/wp-content/uploads/about-button.jpg);}
Any help would be greatly appreciated.

yes the file exists.
ata version 3.6.4
WP version 3.1

Thanks,

Loren

lmilesw May 23, 2011 04:19 PM

You are using an ID name... not a CLASS name. If you put pmabout for a class name on the menu you should use .pmabout for the CSS selector.

pierrebk4 May 23, 2011 05:38 PM

Thanks for the assistance. But now I've got two page menus, one on top of the other.

How to I disable the text menu, and keep the image menu? In other words, how does ata know that I want to use a custom wp menu, and not its standard page menu?

Loren

juggledad May 23, 2011 05:41 PM

What is the url?

pierrebk4 May 23, 2011 05:49 PM

oops sorry,

http://workwithlorensouth.com/

Thanks,

Loren

lmilesw May 23, 2011 06:26 PM

A couple of things you could do is use a background image without the text and style the text with typekit or something of that sort. Or you could use code something like the following in the Navigation Label box for the menu item.
HTML Code:

<img src="http://www.lorensquires.com/workwithlorensouth.com/wp-content/uploads/about-button.jpg" />

pierrebk4 May 23, 2011 07:22 PM

I think this took care of the multiple menus.

Would I now use the css selector for the class that is set for each image in order to take care of borders, padding, and margins?

Thanks,

Loren

lmilesw May 23, 2011 08:41 PM

This is not meant to be exactly what you would use but as a quick example of what can be done.
HTML Code:

#menu1 li.menu-item a:hover {
    border: 1px solid black;
}
#menu1 li {
    margin-right: 3px;
}
#menu1 li.current-menu-item a {
    border: 1px solid black;
}


thekjub9 May 24, 2011 02:56 PM

Hi so I didnt get that clear

question was how to make

(img A)Home (img B) free time (img C) about
-----------------------------------------------------
futball
volleyball
(img D) squash

a reference can be
http://wordpress.org/extend/plugins/...u/screenshots/
can it be done ?
explain carefull I am not php diehard :)))
but I would really love this


I found this maybe it can help
Each of the dropdown items has a unique class - such as .page-item-215. You should be able to use those classes to add an icon as a background image to each individual item. But be warned that your changes will be over-written the next time you upgrade WordPress. For this reason, it is recommended that you consider creating a child theme for your customisations.

lmilesw May 24, 2011 03:42 PM

I would put the images in the navigation box for the menu item.

thekjub9 May 24, 2011 04:48 PM

Quote:

Originally Posted by lmilesw (Post 66240)
I would put the images in the navigation box for the menu item.

? in the next upgrade ? or how ??
thx for answer and affort

lmilesw May 24, 2011 07:00 PM

In the WordPress menu builder you just put the html code for an image in the navigation box.

thekjub9 May 25, 2011 09:35 AM

ok i will try it

no it didnt work ... there was only a clasic text label in menu and after click on new page was the small image displayed

I need it to be before the label in menu
fe.: you make max image size 30x30px and one box where to add relative path and that is

but the default WP menu builder doesnt alow that it alows to make pages or links

thekjub9 May 25, 2011 10:10 AM

I also found this
http://www.kryogenix.org/code/browser/lir/

and this code
Code:

h1#newrepl {
    padding: 35px 0 0 0;
    overflow: hidden;
    background-image: url("hello_world.gif");
    background-repeat: no-repeat;
    height: 0px !important; /* for most browsers */
    height /**/:35px; /* for IE5.5's bad box model */
}

than found that my atahualpa menu has classes

HTML Code:

<li class="page_item page-item-4">
and so maybe you can help me further
I assume that in this way I can put image inside a menu item not to all as background
then maybe if the pics would be 30x30px and I will use for the menu item span - 35px than It can work

plus I have question how to set
Width of Menus?
ATO>menu1>Width of Sub Menus
butt
ATO>menu1>Width of Menus is missing ... :(

lmilesw May 25, 2011 10:36 AM

What I was talking about is putting image code such as <img src="path-to-image" /> in the navigation label for the menu item in question.

thekjub9 May 25, 2011 04:20 PM

Quote:

Originally Posted by lmilesw (Post 66311)
What I was talking about is putting image code such as <img src="path-to-image" /> in the navigation label for the menu item in question.

can you show me in code examples where shall I put it ? and tell me how to make it that in next ubgrade I wont lost this ? pls

lmilesw May 25, 2011 06:47 PM

Here is a screenshot of what I mean. Is that what you are looking for?

thekjub9 May 29, 2011 04:01 AM

HTML Code:

Network <br><center><img src="wp-content/.../netwoek.gif" > </center>
inside the menu item name as on the screenshot thx

thx it really works

is there a way how on hover channge the image ? my font is white and on hover is black
so I would like to do the same with image on hoower change it
but this is not so crucial :)

thx

lmilesw May 29, 2011 07:45 AM

For change of image you would set a class for the menu item and use CSS. This same idea can be used for single images as well but for some reason I can't remember it seemed like putting the image was simpler. Anyway here is a screenshot of where to put the class in your menu item. And here is a screenshot of how to set WP to show the class box if you don't see one.

thekjub9 May 30, 2011 10:27 AM

3 Attachment(s)
thx got another ... I made it as you descirbed .... before (not CSS usage)

and the <img .... > works only on homepage not on oll other sides :(

sleenie May 31, 2011 06:12 PM

1 Attachment(s)
Hi Larry,

I hope you don't mind if I hijack this post. I'm trying to do the same thing as I believe that it will solve my design issues. I'm copying a site to WordPress and it is suppose to look exactly like the site up now. Images were used for the menu items and they want to continue with that. (I know it isn't good for SEO)

I'm trying to use the WordPress menu system. I've put in:

Code:

<img src="http://www.sandynorton.net/Testsite/wp-content/uploads/buttons/home_up2.jpg" />
Nothing is showing. I used the color coded menuing and just made everything transparent. Haven't really added any specific CSS yet.

I've included what the image should look like.

Quote:

Originally Posted by lmilesw (Post 66257)
In the WordPress menu builder you just put the html code for an image in the navigation box.


lmilesw May 31, 2011 07:19 PM

When I use that image path I get nothing.

sleenie May 31, 2011 08:50 PM

I have egg on my face. I verified that so many times. What I realized was I had 2 sites with the same sub-directory but different domain under the hostng company. I FTP to the wrong one. So sorry, it works fine now. As they say..stupid is as studpid does. Fits me tonight.

Thanks Larry.

jrobie23 Aug 24, 2011 10:21 AM

Quote:

Originally Posted by lmilesw (Post 66678)
For change of image you would set a class for the menu item and use CSS. This same idea can be used for single images as well but for some reason I can't remember it seemed like putting the image was simpler. Anyway here is a screenshot of where to put the class in your menu item. And here is a screenshot of how to set WP to show the class box if you don't see one.

Hi Larry,

First of all, thank you for all your posts regarding images in the menu!! Very helpful.

My question is directly related to your post here. I have added the class box to my menu items (wp menu), and added the class in the ATA css inserts. What I'm finding is that I have to put the whole navigation text (where my image is called) into a DIV in order for all of the css to work. For example, it will bump up my font size, but I could not get the color to change without putting the whole thing in a DIV.
Is this simply due to the default widget styling within ATA? I don't want my other widget items to have yellow font, so using the DIV in the full navigation box in the WP menu is totally fine. I just didn't want to be missing out on an alternate way to accomplish this.

____
jason.

juggledad Aug 24, 2011 10:26 AM

with out a url showing the issue it is really hard to guess what you have done.

jrobie23 Aug 24, 2011 11:10 AM

Hi juggledad,

as you may have guessed, this is the same one I just responded to you about on your other post.

http://ridgeviewtechnology.net/wilsontireco/

joe hark Oct 9, 2011 12:02 PM

Please see http://buildinghosting.com/account-manager/

I want the ATA horizontal menu (now text links to pages) to look like the Portal Home button in the page that I have inserted into the center column as an iFrame.

In even simpler language, I want thos ATA generated text links to use the graphic such as "Portal Home."

I greatly appreciate all the promising advice above but it is totally confusing to me. I am not able even to find the starting point for making this happen. The advice above assumes I know where all those things are.

May I ask for a step-by-step that says some like:

1) go to file (or Dashboard screen) blank blank
2) edit line so and so
3) save.

lmilesw Oct 9, 2011 05:38 PM

That isn't an easy step by step but here is a try.
  • Upload background image for the menu item to the media library or the Atahualpa images folder
  • Add "something" like the following in CSS Inserts
HTML Code:

#rmenu2 li a:hover {
    background: url("path_to_image/bb_ga.gif") repeat-x scroll left top transparent !important;
}

The bb_ga.gif image is what is in that example but I am not sure where you can download it.

You will probably have to fiddle with the CSS a bit to get everything right.

joe hark Oct 9, 2011 06:48 PM

First of all, thanks for the response. These forums are the second biggest reason, second only to the product itself, that ATA is such a hit.

The image file is already on the server, in the folder with the account manager. I don't think I need to provide a new path. Linking to the existing file should be sufficient.

But where exactly (in which folder / file of ATA) and where (which line) in that file, do I insert the code you provided?

It's the fiddling with the CSS that intimidates me the most.

joe hark Oct 9, 2011 06:57 PM

I pasted the following code

#rmenu2 li a:hover {
background: url("www.buildinghosting.com/clients/templates/NewDefault/img/bb_ga.gif") repeat-x scroll left top transparent !important;
}

into the CSS Inserts but nothing is changed.

Further instruction will be appreciated.

lmilesw Oct 9, 2011 07:20 PM

You need to start your path with http://

joe hark Oct 9, 2011 07:41 PM

I'm almost there (which counts in horseshoes and hand grenades).

Your good advice (thanks once more) has it working as hover. But once clicked it reverts to the ATA default.

Can you tell me the next step to make it work for the active link?

Regards, Joe

joe hark Oct 9, 2011 07:43 PM

BTW - nothing says thank$ like $.

So I just sent you $ome.

lmilesw Oct 9, 2011 08:19 PM

Here is the brute force method. I just grabbed all the CSS via Firebug. So just use this instead of the #rmenu2 li a:hover
HTML Code:

div#menu1 ul.rMenu li.current_page_item a:link, div#menu1 ul.rMenu li.current_page_item a:active, div#menu1 ul.rMenu li.current_page_item a:hover, div#menu1 ul.rMenu li.current_page_item a:visited, div#menu1 ul.rMenu li a:hover {
background: url("http://www.buildinghosting.com/clients/templates/NewDefault/img/bb_ga.gif") repeat-x scroll left top transparent !important;
}


joe hark Oct 9, 2011 08:32 PM

please look. I pasted the new code in place of the previous.

But all I now have is gray hovers.

What's I do wrong?

Want me to PM access codes so you can look in the Dashbaord?

lmilesw Oct 9, 2011 09:15 PM

I copied and pasted the path without the http:// by mistake. Just add that back in. The code posted in my last message has been updated.

joe hark Oct 9, 2011 09:55 PM

Thank you confirming that you too make an occasional mistake. At times the things you and JuggleDad do a downright scary in their excellence.

Can't have that all the time. That how people got accused of being witches and warlocks. With Halloween coming, that could be dangerous.

But thanks again. It worked and is exactly what I wanted.

lmilesw Oct 10, 2011 06:29 AM

Also if you want to see the whole background image for the menu you could add the following to CSS Inserts
HTML Code:

div#menu1 li a {
    padding: 11px !important;
}


kdawes01 Nov 9, 2011 12:34 PM

Actually, if you are using the WordPress 3.0+ menus, you can just put an <img /> tag in the Navigation Label area... You'll likely need some css in the Atahualpa HTML/css area and you won't automatically have hover effects, but it works!

Ken

mimi Nov 18, 2011 11:01 PM

Quote:

Originally Posted by kdawes01 (Post 75368)
Actually, if you are using the WordPress 3.0+ menus, you can just put an <img /> tag in the Navigation Label area... You'll likely need some css in the Atahualpa HTML/css area and you won't automatically have hover effects, but it works!

Ken

I have been working on this locally (WP3 Menus) recently, and it seems that there is a margin or padding above and below texts in ATA menu bars, so the image makes the menu bar taller.

I have tried the following in Custom > Navigation Label:

Code:

<img src="http://local_website.com/images/picture.png" style="width: 20px; height: 15px; padding: 0; margin: 0;">
I t does not help, the margin and padding is ignored. If you reduce the value for height and width, the image simply shrinks.

There is also another annoying issue (been pulling my hair on this one... ! );
If you create a Custom Link with sub pages below it, like Home for instance, they ALL become selected, as in selected / state (they all get the Background color: Hover), although you can still click on any sub pages, then the behaviour reverts to normal.
This problem is only there for Custom Links.

Any ideas?


All times are GMT -6. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.