Computing.Net > Forums > Web Development > CSS Problem

CSS Problem

Reply to Message Icon

Original Message
Name: BigShow
Date: February 1, 2006 at 22:37:29 Pacific
Subject: CSS Problem
OS: xp
CPU/Ram: pentium 4
Comment:

I have a question about CSS. I wrote a program to use CSS and a little bit of javascript to create a drop down menu, the problem is in order to do this I had to creat my links using a bulleted list. Now I want to put a bullet section in one of the pages but I cannot because it wil create a drop down menu. How can I do a bulleted list without having the CSS override it? I heard something about grouping it and then calling out the group, any ideas? I appreciate any help


Report Offensive Message For Removal


Response Number 1
Name: Laler
Date: February 2, 2006 at 03:30:41 Pacific
Reply: (edit)

in the css:

ul.someclass {
/* definitions here */
}

Or...

.someclass {
/* definitions here */
}

in html:

<ul class="someclass">
<li>item</li>
<li>item</li>
</ul>


---
Site of the Day


Report Offensive Follow Up For Removal

Response Number 2
Name: Laler
Date: February 2, 2006 at 03:32:20 Pacific
Reply: (edit)

and I didn't see the javascript part :D

if the above doesn't work, I think we need to see what kind of javascript you put into it.

---
Site of the Day


Report Offensive Follow Up For Removal

Response Number 3
Name: BigShow
Date: February 2, 2006 at 18:19:00 Pacific
Reply: (edit)

Here is the CSS and the javascript, the script is basically because IE does not really recognize all the css written here.

ul li {
position: relative;
}

li ul {
position: absolute;
left: 200px;
top: 0;
display: none;
}

ul li a {
border-left:0px solid #ccc; border-right:0px solid #ccc; border-top:0px solid #ccc; display: block;
text-decoration: none;
color: #C0BD8A;
background: #104010;
padding: 5px;
border-bottom: 0px none;
}

ul {
margin: 0;
padding: 0;
width: 201px;
border-bottom: 0px solid #ccc; list-style-type:none;
}

li:hover ul, li.over ul{ display: block; text-decoration:none }

html ul li { float: left; height: 1%; }
html ul li a { height: 1%; }


Javascript

<script language="JavaScript" type="text/JavaScript">
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
</script>

how would i do that subclass on lines that have a few different variables on them ie.....ul li a {
border-left


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: CSS Problem

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge