LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-09-2010, 12:55 PM   #1
mutwkil
Member
 
Registered: Feb 2010
Posts: 30

Rep: Reputation: 0
Exclamation css navigation code


Hi every body
i want to make css navigation bar, but my code does not showing drop down list.
can any one help.
Code:
<html>
	<head>
		<title>CSS based drop-down menu</title>	
	<style type="text/css">
 
		ul {
			font-family: Arial, Verdana;
			font-size: 14px;
			margin: 0;
			padding: 0;
			list-style: none;
		}
		ul li {
			display: block;
			position: relative;
			float: left;
		}
		li ul { display: none; }
		ul li a {
			display: block;
			text-decoration: none;
			color: #ffffff;
			border-top: 1px solid #ffffff;
			padding: 5px 15px 5px 15px;
			background: #2C5463;
			margin-left: 1px;
			white-space: nowrap;
		}
		
		ul li a:hover { background: #617F8A; }
		li:hover ul { 
			display: block; 
			position: absolute;
		}
		li:hover li { 
			float: none;
			font-size: 11px;
		}
		li:hover a { background: #617F8A; }
		li:hover li a:hover { background: #95A9B1; }
 
	</style>		
	</head>
	<body>
	
		<ul id="menu">
			<li><a href=#>Home</a></li> 
		    <li><a href="">About</a> 
		      <ul>
		      	<li><a href=#>The Team</a></li>
		        <li><a href=#>History</a></li> 
		        <li><a href=#>Vision</a></li> 
		      </ul> 
		    </li> 
		    <li><a href="">Products</a> 
		      <ul> 
		        <li><a href="">Cozy Couch</a></li> 
		        <li><a href="">Great Table</a></li> 
		        <li><a href="">Small Chair</a></li> 
		        <li><a href="">Shiny Shelf</a></li> 
		        <li><a href="">Invisible Nothing</a></li> 
		      </ul> 
		    </li>
		    <li><a href="">Contact</a> 
		      <ul> 
		        <li><a href="">Online</a></li> 
		        <li><a href="">Right Here</a></li> 
		        <li><a href="">Somewhere Else</a></li> 
		      </ul> 
		    </li> 
		</ul>	
	
	</body>
</html>
 
Old 11-09-2010, 12:59 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 273Reputation: 273Reputation: 273
When I paste that code into a text file and save it as an html, it works fine in Firefox 3.6.12 on Win7 64-bit but fails on Internet Explorer 8.0.7600.16385. I'm guessing you're failing on IE due to some stupid flaw in how IE handles CSS.

Maybe try a conditional stylesheet for IE.

Last edited by pljvaldez; 11-09-2010 at 01:00 PM.
 
Old 11-09-2010, 01:26 PM   #3
fbobraga
Member
 
Registered: Jul 2010
Location: São Paulo - Brasil
Distribution: Debian 7 / Crunchbang 11
Posts: 229

Rep: Reputation: 41
Quote:
Originally Posted by pljvaldez View Post
When I paste that code into a text file and save it as an html, it works fine in Firefox 3.6.12 on Win7 64-bit but fails on Internet Explorer 8.0.7600.16385.
Same thing here, with XP SP3
 
Old 11-09-2010, 09:55 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 16,763
Blog Entries: 27

Rep: Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086
Quote:
Originally Posted by pljvaldez View Post
When I paste that code into a text file and save it as an html, it works fine in Firefox 3.6.12 on Win7 64-bit but fails on Internet Explorer 8.0.7600.16385.
Same thing here on Debian with Opera 10.63, Konqueror 3.5.9. It even displays in w3m.

It's not your coding.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML/CSS/JS: Problem with <p> not having an absolute position with CSS. RHLinuxGUY Programming 7 03-03-2007 01:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration