Div container with background image

Everything to do with Joomla! 2.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
alainjanquart
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 14, 2013 8:43 am

Div container with background image

Post by alainjanquart » Sun Jan 26, 2014 11:18 am

Hello,

I have a div container in my template.
There I put my navigation menu in it.
I want to display a background image in that container.
But the image is showing under the menu. And I want it behind the menu.
So that it looks like the menu is in the image.

I tried to nest a second container in my first one, but that does not work.

Any idea how i can do that?

Thanks in advance

Lainkes

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 34724
Joined: Sat Apr 05, 2008 9:58 pm

Re: Div container with background image

Post by Webdongle » Sun Jan 26, 2014 11:22 am

Give the css for the div's class/id a z-index minus value http://www.w3schools.com/cssref/pr_pos_z-index.asp ???

alainjanquart
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 14, 2013 8:43 am

Re: Div container with background image

Post by alainjanquart » Sun Jan 26, 2014 11:43 am

This is my css code :

Code: Select all

#navigation{
	background: #e2e7d3 url(../images/navigation.png) no-repeat 15px 189px;
	z-index:-1;
	position: absolute;
	left: 10px;
	width: 200px;
	height: 380px;
	border: 1px solid #F60;
	color: #999;
	text-align: left;
	top: 175px;
}
i guess I'm doing something wrong here.

Thanks for feedback

Lainkes

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 24616
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Div container with background image

Post by Per Yngve Berg » Sun Jan 26, 2014 1:25 pm

Do you have a link to the page?

You are displacing the background image by 15px 189px.

alainjanquart
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 14, 2013 8:43 am

Re: Div container with background image

Post by alainjanquart » Sun Jan 26, 2014 4:17 pm

I found the solution in the meantime by experementing a bit.

Thanks for the tips.

Lainkes

Reditron1
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon May 08, 2017 10:29 am

Re: Div container with background image

Post by Reditron1 » Mon May 08, 2017 10:32 am

I am also currently experiencing this problem which is driving me nuts! \

any idea how I can change the background image... my current template is mx_joofree12.

url: http://reditron.co.za/

Thanks


Post Reply

Return to “Templates for Joomla! 2.5”