[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

A smile css menu with different width

Posted on 2008-10-10
4
Medium Priority
?
213 Views
Last Modified: 2012-08-13
Can anyone  please code this simple css menu. Each link must have  different width. And please can the other words come on a different line as  shown in the demo picture of the menu.
Thank you
menu-Demo.jpg
0
Comment
Question by:xposegrafix
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
ad5qa earned 600 total points
ID: 22689806
This will get you started

<style type="text/css">
#nav
{
	font-size: 14px;
	font-family: arial;
	margin: 0px;
	padding: 0px;
	list-style-type: none;
	float: left;
	border-left: 1px solid #ccc;
}
#nav li
{
	margin: 0px;
	padding: 0px;
	float: left;
	font-weight: bold;
}
#nav a
{
	padding: 0px 5px 0px 5px;
	height: 40px;
	display: block;
	float: left;
	text-align: center;
	color: #800000;
	text-decoration: none;
	border-right: 1px solid #ccc;
	vertical-align: center;
}
#nav a:hover
{
	background-color: #800000;
	color: #ffffff;
}
</style> 
 
 
<ul id="nav">
<li><a href="">About US</a></li>
<li><a href="">Financial<br />Services</a></li>
<li><a href="">Social<br />Responsibility</a></li>
<li><a href="">Social<br />Responsibility</a></li>
<li><a href="">Financial<br />Services</a></li>
</ul>

Open in new window

0
 
LVL 4

Expert Comment

by:ad5qa
ID: 22689967
Better Yet


<style type="text/css">
#nav
{
	font-size: 14px;
	font-family: arial;
	margin: 0px;
	padding: 0px;
	list-style-type: none;
	float: left;
	 
}
#nav li
{
	margin: 0px 0px 0px 3px;
	padding: 0px;
	float: left;
	font-weight: bold;
}
#nav a
{
 
	height: 35px;
	display: block;
	float: left;
	text-align: center;
	color: #800000;
	text-decoration: none;
}
#nav a:hover
{
	background-color: #800000;
	color: #ffffff;
}
#nav li span
{
	height: 35px;
	border-right: 4px solid #ccc;
}
#nav li.oneline
{
	line-height:35px;
}
</style> 
 
 
<ul id="nav">
<li class="oneline"><a href="">About US</a><span></span></li>
<li><a href="">Financial<br />Services</a><span></span></li>
<li><a href="">Social<br />Responsibility</a><span></span></li>
<li><a href="">Social<br />Responsibility</a><span></span></li>
<li><a href="">Financial<br />Services</a></li>
</ul>

Open in new window

menu.jpg
0
 
LVL 16

Expert Comment

by:rbudj
ID: 22690320
here you go... i placed the images in a folder called menu... adjust the paths as needed.  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<title></title>
<style type="text/css">
#container {
width:500px;
}
 
#oneone {
width:76px;
float:left;
}
 
#twotwo {
width:99px;
float:left;
 
}
 
#threethree {
width:107px;
float:left;
 
}
 
#fourfour {
width:131px;
float:left;
}
 
#fivefive {
width:87px;
float:left;
}
</style>
</head>
<body>
<div id="container">
<div id="oneone"><img src="menu/1.jpg" width="76" height="50" /></div>
<div id="twotwo"><img src="menu/2.jpg" width="99" height="50" /></div>
<div id="threethree"><img src="menu/3.jpg" width="107" height="50" /></div>
<div id="fourfour"><img src="menu/4.jpg" width="131" height="50" /></div>
<div id="fivefive"><img src="menu/5.jpg" width="87" height="50" /></div>
 
</div>
</body>
</html>

Open in new window

menu.zip
0
 

Author Comment

by:xposegrafix
ID: 22690341
Okay I will look into it right now and get back to you. Thank you rbudj.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question