Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
multiple background images in list
Old 03-25-2010, 04:20 PM multiple background images in list
Junior Talker

Posts: 1
Name: Steve
Trades: 0
Hi All

I'm trying to create a list where each item has a unique image attached to it. I've tried giving each <li> it's own id but can't get the individual images to show.

The list contains eight items, I've just pasted in the code (below) for two of them as an example of what I have written.

Could anyone point out where I'm going wrong?

Many thanks,

Dunners


CSS
PHP Code:
#sidebar ul {margin: 1px 1px;}

#sidebar li {border-bottom:dashed #dbdbdb 1px;display:block; list-style:none; padding: 5px 5px 5px 40px;}

#sidebar li.desktop {background:url(/images/icons/health_check.png) no-repeat 0 0;}

#sidebar li.healthcheck {background:url(/images/icons/health_check.png) no-repeat 0 0;} 
HTML
HTML Code:
<div id="sidebar">
<ul>
<a href="healthcheck.html"><li id="healthcheck">
<h2>System Health Check</h2>
<p>Let us assess the health of your IT Systems</p> 
<p>more...</p>
</li></a>

<a href="desktop.html"><li id="desktop">
<h2>Desktop &amp; Server Solutions</h2>
<p>Hardware and software solutions for all needs</p> 
<p>more...</p>
</li></a>

<a href="storage.html"><li id="storage">
<h2>Data Storage</h2>
<p>Protect your data from attack or intrusion</p> 
<p>more...</p>
</li></a>
</ul>
</div>

Last edited by chrishirst; 03-25-2010 at 05:30 PM.. Reason: added
dunners is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-25-2010, 09:34 PM Re: multiple background images in list
R1im's Avatar
Average Talker

Posts: 24
Name: Rain Ungert
Location: Estonia
Trades: 0
HTML Code:
#sidebar ul {margin: 1px 1px;}

#sidebar li {border-bottom:1px dashed #dbdbdb;display:block; list-style:none; padding: 5px 5px 5px 40px;}

div ul li.desktop {background: url('/images/icons/health_check.png') no-repeat 0 0;} 

div ul li.healthcheck {background: url('/images/icons/health_check.png') no-repeat 0 0;}  
HTML Code:
<div id="sidebar">
<ul>
	<li class="healthcheck">
	<div>
			<a href="healthcheck.html">
				<h2>System Health Check</h2>
				<p>Let us assess the health of your IT Systems</p> 
				<p>more...</p>
			</a>
	</div>
	</li>
	


	<li class="desktop">
		<a href="desktop.html">
			<h2>Desktop &amp; Server Solutions</h2>
			<p>Hardware and software solutions for all needs</p> 
			<p>more...</p>
			</a>
	</li>

	<li class="storage">
		<a href="storage.html">
			<h2>Data Storage</h2>
			<p>Protect your data from attack or intrusion</p> 
			<p>more...</p>
		</a>
	</li>
</ul>
</div>
try this
__________________
Working on
Please login or register to view this content. Registration is FREE
. SEO tools i use:
Please login or register to view this content. Registration is FREE

Last edited by R1im; 03-25-2010 at 09:37 PM..
R1im is offline
Reply With Quote
View Public Profile Visit R1im's homepage!
 
Old 03-28-2010, 07:42 PM Re: multiple background images in list
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Dunners, your problem, from the code you posted, is that you're using an ID in your html, but you've defined the css as a CLASS. R1im's example above corrects that.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 03-31-2010, 12:28 AM Re: multiple background images in list
Average Talker

Posts: 26
Name: Chris
Trades: 0
You need to check out the div tag and if there is no problem in it then check out all the li tags....
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
chris.klinton is offline
Reply With Quote
View Public Profile
 
Old 03-31-2010, 05:31 AM Re: multiple background images in list
Banned

Posts: 14
Name: diagur
Trades: 0
Hi, Friends...
Thanks for such a nice post...
diagurzula is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to multiple background images in list
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30802 seconds with 12 queries