Imagebaground on menu item

About the template and stylesheet - and changing the menu
Post Reply
Bibber
Posts: 40
Joined: Mon Sep 08, 2008 2:01 pm

Imagebaground on menu item

Post by Bibber » Thu Mar 19, 2009 2:16 pm

Hello,

Is it possible to make the menu items as buttons by adding a gif/jpg image as background. I don't mean the small icons that comes with the standard version. But it should look like a real "button menu" with the menutext on the button.

Thx in advance

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Imagebaground on menu item

Post by Tata » Thu Mar 19, 2009 2:37 pm

It is not exatly what you mean. But I use on some pages only one image for menu (5px x 20px) and this code in stylesheet.css>

Code: Select all

.doc,.docs,.sdoc {
	list-style: none;
	padding-left: 15px;
	background: url(menu/doc.jpg) no-repeat;
	color:white;
}
.sdocs {
	list-style: none;
	padding-left: 15px;
	background: url(menu/doc.jpg) repeat-x;
	color:white;	
}
But there are many templates from which to learn (e.g.: http://cmsimple.de/cmsimple/index.php?C ... Edition%29). Search in templates.
Last edited by Tata on Sat Mar 21, 2009 6:01 pm, edited 1 time in total.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Bibber
Posts: 40
Joined: Mon Sep 08, 2008 2:01 pm

Re: Imagebaground on menu item

Post by Bibber » Thu Mar 19, 2009 2:47 pm

Thx ,

What I mean was that instead of text link there would be an icon/image to use. But I guess I can't suppress the automatic generated link when creating a site. But as you suggest I can change image in the sdocs. Maybe then give the menu links the same color as the background, so you wont see them. Is that how you have done ?

best regards

bibber

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Imagebaground on menu item

Post by Tata » Thu Mar 19, 2009 8:15 pm

Not exactly. You may soecify icons or images for 4 stages:

doc - for single page (or the "deepest" subpage - e.g. H3)
docs - for a page with subpages
sdoc - for selected single page (or the "deepest" subpage - e.g. H3)
sdocs - for selected page with subpages

Then if you have 4 H1 pages, adding to the menulevel1 the same color like anz of th 4 stages, you will see nothing but 4 identical buttons in the toc.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Bibber
Posts: 40
Joined: Mon Sep 08, 2008 2:01 pm

Re: Imagebaground on menu item

Post by Bibber » Sat Mar 21, 2009 3:22 pm

Thankyou TATA :D

It worked fine - exactly as I wanted !

Post Reply