Web Design Forum  

Go Back   Web Design Forum > Web and Graphic Design > Web Design

Like Tree3Likes

Reply
 
LinkBack Thread Tools Display Modes
Old 08-03-2012, 12:23 PM   #1
New Member
 
Join Date: Aug 2012
Posts: 7
Default Multiple Columns on Menu

I would like to add some columns under my products link. For example,

Title Title Title Title
Vendor Vendor
Vendor Vendor
Vendor Vendor

Please let me know if someone could help me on this.

Thanks

Joe

HTML Code:
<section id="navigation">
                    <nav>
                        <ul id="topnav" class="sf-menu">
                            <li class="current"><a href="index.html">Home</a></li>
                            <li><a href="#">About</a></li>
                            <li><a href="#">Services</a></li>
                            <li><a href="#">News</a></li>
                            <li><a href="#">Products</a></li>
                            <li><a href="#">Testimonials</a></li>
                            <li><a href="#">Contact</a></li>
                        </ul><!-- topnav -->
                    </nav><!-- nav -->	
                    <div class="clear"></div>
                </section>
                <div class="clear"></div>
            </header>
        </div>
Code:
#navigation {
float:none; 
clear:both; 
background:url(../images/bg-navigation.png) repeat; 
}
nav{
position:relative;	
z-index:9000; 
float:none; 
margin:0 0 0 0;
}

#topnav{
	margin:0;
	padding:0;
	list-style-type:none;
	overflow:visible;
	position:relative;
	float:left;
	font-size:14px;
	font-family:'DroidSansRegular', Arial;
  }
.sf-menu a {
	text-decoration:none!important;
	display:		block;
	position:		relative;
	padding: 		0 25px !important;
	text-decoration:none;
	font-weight:normal;
	text-transform:uppercase;
	color:#ededed;
	text-shadow:1px 1px 0 #151515;

}
.sf-menu a:visited {
color:#ededed;
}
.sf-menu a:hover, .sf-menu li a.current {
color:#fff;
}
.sf-menu li.sfHover a:hover {
color:#ededed;
}

.sf-menu li a {
background:url(../images/bg-sepmenu.gif) repeat-y top right; line-height:42px;
}
.sf-menu li { 
padding:0 0;
}
.sf-menu li:hover,
.sf-menu .current, .sf-menu  .current:hover {
background:url(../images/bg-navcurrent.png) repeat;
}

/* Drop down menu */
.sf-menu ul a:hover {}
.sf-menu li li {
	text-align:left;
	line-height:20px;
	margin:0;
}
.sf-menu, .sf-menu * {
	margin:			0;
	padding:		0;
	list-style:		none;
	
}
.sf-menu {
	line-height:100%;
	position:absolute;
	right:0;
	bottom:0;
	float:left;
}
.sf-menu ul {
	position:		absolute;
	top:			-999em;
	width:			14em; /* left offset of submenus need to match (see below) */
}
.sf-menu ul li {
	width:			100%;
}
.sf-menu li:hover {
	visibility:		inherit; /* fixes IE7 'sticky bug' */
}
.sf-menu li {
	float:			left;
	position:		relative;
	margin:0;
}

.sf-menu li li{ 
margin:0px 0px;
}


.sf-menu li:hover ul,
.sf-menu li.sfHover ul {
	left:			0px;
	top:			3.7em; /* match top ul list item height */
	z-index:		99;

}
ul.sf-menu li:hover li ul,
ul.sf-menu li.sfHover li ul {
	top:			-999em;
}
ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {
	left:			14em; /* match ul width */
	top:			-1px;
	margin-left:	0px;
}
ul.sf-menu li li:hover li ul,
ul.sf-menu li li.sfHover li ul {
	top:			-999em;
	
}
ul.sf-menu li li li:hover ul,
ul.sf-menu li li li.sfHover ul {
	left:			14em; /* match ul width */
	top:			-1px;
	
}
.sf-menu ul li a{
	padding:14px 25px!important;
	text-transform:capitalize;
	line-height:normal;
	display:block; width:auto; white-space:no-wrap;
}

.sf-menu ul li a:hover{}
.sf-menu li ul {
	padding:0px;
}
.sf-menu a.sf-with-ul {
	padding-right: 	0px;
	min-width:		1px; /* trigger IE7 hasLayout so spans position accurately */
}
.sf-sub-indicator {
	position:		absolute;
	display:		block;
	right:			10px;
	top:			1.05em; /* IE6 only */
	width:			10px;
	height:			10px;
	text-indent: 	-999em;
	overflow:		hidden;
}
.sf-menu li li a {
background:transparent; font-size:14px;
}
.sf-menu li li {
background:url(../images/submenu.png) repeat; border-bottom:solid 1px
}
.sf-menu li li:hover {
background:url(../images/submenu-hover.png) repeat;
}

Last edited by PixelPusher; 08-03-2012 at 05:51 PM.
shaker12 is offline   Reply With Quote
Old 08-03-2012, 02:02 PM   #2
Diamond Member
 
chrishirst's Avatar
 
Join Date: May 2012
Location: Blackpool
Posts: 1,327
Default

http://www.cssplay.co.uk/menus/
__________________
When the mind is enlightened, the spirit is free and the body matters not.
chrishirst is offline   Reply With Quote
Old 08-03-2012, 06:00 PM   #3
Diamond Member
 
PixelPusher's Avatar
 
Join Date: Oct 2008
Location: Arizona, USA
Posts: 1,092
Default

Simple enough. How many columns?

Also, you should look into other float clearing methods (i.e. clearfix). Using the empty div element after a floated item is not the best practice IMO. I prefer to use the :after pseudo class on the parent element to the floated items. Cleaner option.

Float clear class
Code:
.clearfix:after {
  content:'"";
  display:block;
  height:0;
  line-height:0;
  clear:both;
  visibility:hidden;
}
ronaldroe, AsheSkyler and shaker12 like this.
__________________
John Darling
Graphic / Web Designer / Front-end Developer
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
jsdarling.com
PixelPusher is offline   Reply With Quote
Old 08-03-2012, 08:27 PM   #4
Diamond Member
 
ronaldroe's Avatar
 
Join Date: Jan 2011
Location: Oklahoma City, OK
Posts: 1,020
Send a message via Skype™ to ronaldroe
Default

Quote:
Originally Posted by PixelPusher View Post
I prefer to use the :after pseudo class on the parent element to the floated items. Cleaner option.
*Initiates slow clap*
So many people doing the empty div thing. It's not semantic and bloats code. The :after pseudo element is so much better.
ronaldroe is offline   Reply With Quote
Old 08-03-2012, 09:45 PM   #5
New Member
 
Join Date: Aug 2012
Posts: 7
Default

I would like to create about 4 to 5 columns under product with sub titles. Would I be able to put 2 or 3 in one column? We have alot of products.

Last edited by shaker12; 08-03-2012 at 09:48 PM.
shaker12 is offline   Reply With Quote
Old 08-04-2012, 07:18 PM   #6
New Member
 
Join Date: Aug 2012
Posts: 7
Default

Just curious if you have any ideas.

http://www.whitehouse.gov/ if you hover over issues this is somewhat what I would like other than the line under title and links below it.

I didn't want to use this page as example but this is the quickest one I could find. I want to use the same colors and boxes though I want to be able to list all of our product types on here to link to our main product pages. It will make it so I dont have to make another page.

Let me know your thoughts.
shaker12 is offline   Reply With Quote
Old 08-05-2012, 09:39 AM   #7
Diamond Member
 
chrishirst's Avatar
 
Join Date: May 2012
Location: Blackpool
Posts: 1,327
Default

And have you looked at the source code of the document to see what does what?

It is simply a "flyout/dropdown menu

http://www.cssplay.co.uk/menus/pro-flyout-list.html
__________________
When the mind is enlightened, the spirit is free and the body matters not.
chrishirst is offline   Reply With Quote
Old 08-05-2012, 10:56 PM   #8
New Member
 
Join Date: Aug 2012
Posts: 7
Default

I dont see any place on the site where to dowload or view the source code. Do you mean to view with right click of mouse to view codes. I was holdin off alittle to see if pixel would come up with something from codes provided.
shaker12 is offline   Reply With Quote
Old 08-05-2012, 11:32 PM   #9
Diamond Member
 
ronaldroe's Avatar
 
Join Date: Jan 2011
Location: Oklahoma City, OK
Posts: 1,020
Send a message via Skype™ to ronaldroe
Default

Check this out: http://www.webdesignforum.com/15191-...down-menu.html

Then, in place of the nested lists, add divs with all of your content, be it multiple other lists, images, a jQuery slider even (holy crap, that idea could be useful...dibs!). Then just style everything as needed.
ronaldroe is offline   Reply With Quote
Old 08-06-2012, 08:39 AM   #10
Diamond Member
 
chrishirst's Avatar
 
Join Date: May 2012
Location: Blackpool
Posts: 1,327
Default

Quote:
Originally Posted by shaker12 View Post
I dont see any place on the site where to dowload or view the source code. Do you mean to view with right click of mouse to view codes. I was holdin off alittle to see if pixel would come up with something from codes provided.
By viewing the source code of a document that already does what you want do DOES already provide you with working code.

Reverse engineering existing and working code is a good way of learning how things work. Being "spoon-fed" with code serves no real useful purpose, as all you have learned is how to ask. Studying other peoples code means you start to learn for yourself.

It is the "Give a man a fish" principle.
__________________
When the mind is enlightened, the spirit is free and the body matters not.
chrishirst is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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



All times are GMT. The time now is 11:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.