Advertisement

08.30.2008 at 04:41AM PDT, ID: 23690885
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

CSS List issue

Asked by satmanuk in Cascading Style Sheets (CSS)

Hi all,

I am having a look at creating a navigation CSS section for my site. I searched around on the web and foud the below example(code snippet below)

it all looks fine but i need to do some work on the down state i think?

I am fairly new to CSS but i have done quite a bit of programming so i thought i would test how this works.

I noticed that the list class when set to  "on" is supposed to show the appropiate image to show that it has been clicked. At least thats what i thought. All the other lists are set to "off" and one is set to "on" . And this when viewed through a browser shows the menu with the "on" class to have the click, downstate image.

When i experimented with changing which menu had the on class the down state image doesnt work?

Any ideas?
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script language="JavaScript" src="ieHover.js"></script>
	<style type="text/css" media="all">
 
	#divNav {
		background: transparent url(images/banner1.jpg) no-repeat top left;
		margin: 0;
		padding: 0;
		height: 255px;
		width: 973px;
	}
 
	#nav {
		position: relative;
		top: 55px;
		height: 80px;
		width: 800px;
	}
 
	#nav li ul, #nav li ul {
		margin: 0;
		padding: 0;
	}
 
	#nav a {
		text-decoration: none;
	}
 
	#nav li { /*float the main list items*/
		margin: 0;
		float: left;
		display: block;
		padding-right: 15px;
	}
 
	#nav li ul {
		display: none;
	}
 
	#nav li.off ul, #nav li.on ul  { /*put the subnav below*/
		position: absolute;
		top: 25px;
		left: 0;
		padding-top: 15px;
		background: #224d6f;
		height: 28px;
		width: 740px;
		padding-left: 60px;
	}
 
	#nav li.on ul {
		background: #f90;
	}
 
	#nav li.on:hover ul, #nav li.over ul { /*for ie*/
		background: #224d6f;
	}
 
	#nav li a {
		color: #224d6f;
		font-weight: bold;
		display: block;
		width: 93px;
		padding: 0;
	}
 
	#nav li.on a {
		color: #f90;
	}
 
	#nav li.on ul a, #nav li.off ul a {
		border: 0;
		float: left; /*ie doesn't inherit the float*/
		color: #f90;
		width: auto;
		margin-right: 15px;
	}
 
	#nav li.on:hover ul a, #nav li.over ul li a { /*for ie - the specificity is necessary*/
		background: #224d6f;
	}
 
	#nav li.on ul {
		display: block;
	}
 
	#nav li.off:hover ul, #nav li.over ul {
		display: block;
		z-index: 6000;
	}
 
	#nav li.off a:hover, #nav li.on a:hover { 
		color: #f90;
	}
 
	/*do the image replacement*/
 
	#nav li span {
		position: absolute;
		left: -9384px;
	}
 
	#liRenaissance a, #liArtNouveau a, #liModern a, #liPostModern a, #liDigital a {
		display: block;
		position: relative;
		height: 26px;
		background: url(images/bk-dropdownMap.gif) no-repeat; /*contains all hover states*/
	}
 
/*first, put the initial states in place*/
 
#liRenaissance a {
	background-position: 0 0;
}
 
#liArtNouveau a {
	background-position: -102px 0;
}
 
#liModern a {
	background-position: -204px 0;
}
 
#liPostModern a {
	background-position: -306px 0;
}
 
#liDigital a {
	background-position: -408px 0;
}
 
/*active area - for this demo - the code could be based on a body class, and probably work better.*/
 
 #liModern.on a {
 	background-position: -204px -37px;
 } /*add selectors for the other li's and background-positions*/
 
/*hover states*/
 
#liRenaissance a:hover, #liRenaissance:hover a, #liRenaissance.over a {
	background-position: 0 -73px;
}
 
#liArtNouveau a:hover, #liArtNouveau:hover a, #liArtNouveau.over a {
	background-position: -102px -73px;
}
 
#liModern a:hover, #liModern:hover a, #liModern.over a {
	background-position: -204px -73px;
}
 
#liPostModern a:hover, #liPostModern:hover a, #liPostModern.over a {
	background-position: -306px -73px;
}
 
#liDigital a:hover, #liDigital:hover a, #liDigital.over a {
	background-position: -408px -73px;
}
 
/*subnav formatting*/
 
#nav li.off ul a, #nav li.on ul a {
	display: block;
	background: #224d6f;
	color: #fff;
	font-family: verdana, arial, sans-serif;
	font-size: small;
}		
 
#nav li.on ul a {
	background: #f90;
}
	
 
	</style>
</head>
 
 
 
 
 
<body>
<div id="divNav">
	<ul id="nav">
 
	<li id="liRenaissance" class="off"><a href="#"><span>Renaissance</span></a>
	<ul>
		<li><a href="#">Log Out</a></li>
		<li><a href="#">Change Password</a></li>
		<li><a href="#">Edit Profile</a></li>
	</ul></li>
	<li id="liArtNouveau" class="off"><a href="#"><span>Art Nouveau</span></a>
	<ul>
		<li><a href="#">Sessions</a></li>
		<li><a href="#">Gallery</a></li>
		<li><a href="#">Catches</a></li>
		<li><a href="#">Stats</a></li>
	</ul></li>
	<li id="liModern" class="on"><a href="#"><span>Modern</span></a>
	<ul>
		<li><a href="#">Send New Message</a></li>
		<li><a href="#">Inbox</a></li>
		<li><a href="#">Sent Items</a></li>
	</ul></li>
	<li id="liPostModern" class="off"><a href="#"><span>Postmodern</span></a>
	<ul>
		<li><a href="#">Venturi</a></li>
		<li><a href="#">Eisenman</a></li>
 
		<li><a href="#">Stern</a></li>
		<li><a href="#">Graves</a></li>
		<li><a href="#">Gehry</a></li>
	</ul></li>
	<li id="liDigital" class="off"><a href="#"><span>Digital</span></a>
	<ul>
		<li><a href="#">Xenakis</a></li>
 
		<li><a href="#">Lynn</a></li>
		<li><a href="#">Diller+Scofidio</a></li>
		<li><a href="#">Zellner</a></li>
		<li><a href="#">Hadid</a></li>
	</ul></li>
</ul></div>
</body>
</html>
[+][-]08.30.2008 at 06:19AM PDT, ID: 22351818

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2008 at 03:59PM PDT, ID: 22356681

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2008 at 05:10PM PDT, ID: 22356847

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2008 at 05:25PM PDT, ID: 22356892

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Cascading Style Sheets (CSS)
Sign Up Now!
Solution Provided By: VirusMinus
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.31.2008 at 06:27PM PDT, ID: 22357019

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2008 at 07:04PM PDT, ID: 22357125

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.01.2008 at 01:22AM PDT, ID: 22358242

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628