LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 08-15-2007, 04:29 AM   #1
gogul2k
LQ Newbie
 
Registered: Jun 2007
Location: In a house
Distribution: Fluxbuntu, Damn Small Linux, Puppy, Slax
Posts: 13

Rep: Reputation: 0
Need help fixing a list item menu (CSS/HTML)


Well I've got a problem with a drop down menu at silverhouseproperty.com caused by me when I did an edit to a CSS file because long story short there was a mix up between a current stylesheet and a backup.

Anyway I want the items in the drop down list to line up with each other and for each list item on the drop down list under "Services" and "Other Info" to clear onto a new line, as currently they seem to run into each other.

Though I have a fairly good knowledge of (X)HTML/CSS I don't have much experience with implementing list item menus.

I'm hoping I can get this fixed fairly soon, though I'd be much obliged if someone could help me out with this by offering advice or a fix?

Here is the CSS
Code:
#horizontal, #horizontal ul {
	padding: 0;
	margin: 0;
	list-style: none;
}
	/*  background: #274A74;
*/
#horizontal a {
	font-size: 12px;
	line-height: 22px;
	color: #FFF;
	text-decoration: none;
	display: block;
	background: #274A74;
}
#horizontal a:hover {
	display: block;
	background: #6792B4;
}
#horizontal li {
	float: left;
}
#horizontal li ul {
	position: absolute;
	left: -999em;
}
#horizontal li:hover ul {
	left: auto;
}
#horizontal li:hover ul, #horizontal li.sfhover ul {
	left: auto;
}
.shadowOrange {
	display: block;
	height: 20px;
	background: url('../images/layout/general/shadow_orange.gif') repeat-x;
}
#horizontal .selected a {
	background: #6792B4;
}
#horizontal .index {
	width: 53px;
	text-align: center;
}
#horizontal .aboutus {
	width: 74px;
	text-align: center;
}
#horizontal .downloads {
	width: 87px;
	text-align: center;
}
#horizontal .news {
	width: 54px;
	text-align: center;
}
#horizontal .links {
	width: 51px;
	text-align: center;
}
#horizontal .register {
	width: 71px;
	text-align: center;
}
#horizontal .investment {
	width: 90px;
	text-align: center;
}
#horizontal .contact {
	width: 88px;
	text-align: center;
}
#horizontal .services {
	width:116px;
	text-align: center;
}
#horizontal .other-info {
	width: 116px;
	text-align:center;
And here is the HTML
Code:
<ul id="horizontal" class="large">
        <li class="index"><a href="index.php">Home</a></li><li class="aboutus"><a href="aboutus.php">About us</a></li><li class="downloads"><a href="downloads.php">Downloads</a></li><li class="news"><a href="news.php">News</a></li><li class="links"><a href="links.php">Links</a></li><li class="register"><a href="register.php">Register</a></li><li class="investment"><a href="investment.php">Investment</a></li><li class="contact"><a href="contact.php">Contact Us</a></li><li class="services"><a href="#.php">Services</a><ul><li><a href="serviceone.php">Country Research</a></li><li><a href="financing.php">Financing A Purchase</a></li><li><a href="lettingsmanagement.php">Lettings & Management</a></li><li><a href="duediligence.php">Due Diligence</a></li><li><a href="purchaseprocess.php">Purchase Process</a></li><li><a href="viewingtrips.php">Viewing Trips</a></li><li><a href="service.php">Legal Services</a></li></ul></li><li class="other-info"><a href="#.php">Other Info</a><ul><li><a href="investingabroad.php">Investing Abroad</a></li><li><a href="privacypolicy.php">Privacy Policy</a></li><li><a href="tscs.php">Terms and Conditions</a></li></ul></li>      </ul>
.

If you want to view the source of the site, the parent ul for the menu starts from line 115 I think.

Many thanks in advance!
 
Old 08-15-2007, 09:08 PM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,352

Rep: Reputation: 129Reputation: 129
you want to set the width of the drop down menu anchor to be auto, so that it fills the available width. I would wrap the drop down list in a div with a fixed width to ensure that it wraps nicely but I didn't spot a div in your long html line...
 
Old 08-16-2007, 05:28 AM   #3
gogul2k
LQ Newbie
 
Registered: Jun 2007
Location: In a house
Distribution: Fluxbuntu, Damn Small Linux, Puppy, Slax
Posts: 13

Original Poster
Rep: Reputation: 0
Haven't quite worked it out yet, but thanks graemef.

The menu has been generated via a PHP/MySQL content management system and because I don't have a very good knowledge of those languages (well I've no knowledge of MySQL), I don't think I should play around with the source code for the files that have generated the menu.

It's just the style sheet which has changed though it was working before I did the edit, but if I can't fix it then I might have to resort to altering the source file for the menu I think.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing item from hardware list TuxLives Mandriva 2 06-15-2007 11:20 AM
New Terminal menu item does nothing flgal3 Red Hat 11 02-05-2006 09:27 PM
Help with menu item in fluxbox thoffland Linux - Software 2 01-29-2006 02:36 AM
add a menu item in gnome... jkassemi Linux - Newbie 1 03-31-2005 11:38 PM
Menu item in Madrake 9.2 Veli Mandriva 2 07-11-2004 06:24 AM


All times are GMT -5. The time now is 02:34 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration