Turning a horizontal breadcrumbs navigation, vertical - html

This might be a but too much to ask, but I am at my limits here.
I have this (http://jsfiddle.net/3whTa/) piece of CSS, that creates an arrow horizontal breadcrumbs navigation.
What I want to do is convert it to vertical. As in, the arrows points down on eachother, but text is still horizontal (would have to be resized then).
How is this possible? Also, I have tried searching around for a navigation like this, but I havent found anything, so a point in the right direction would be just as helpful.
You can see it in action, and the code in the linked jsfiddle above, but i will paste it in here as well:
HTML
<ul id="breadcrumbs-two">
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
</ul>
CSS
#breadcrumbs-two{
overflow: hidden;
width: 100%;
margin: 0;
padding: 0;
list-style: none;
}
#breadcrumbs-two li{
float: left;
margin: 0 .5em 0 1em;
}
#breadcrumbs-two a{
background: #ddd;
padding: .7em 1em;
float: left;
text-decoration: none;
color: #444;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
position: relative;
}
#breadcrumbs-two a:hover{
background: #99db76;
}
#breadcrumbs-two a::before{
content: "";
position: absolute;
top: 50%;
margin-top: -1.5em;
border-width: 1.5em 0 1.5em 1em;
border-style: solid;
border-color: #ddd #ddd #ddd transparent;
left: -1em;
}
#breadcrumbs-two a:hover::before{
border-color: #99db76 #99db76 #99db76 transparent;
}
#breadcrumbs-two a::after{
content: "";
position: absolute;
top: 50%;
margin-top: -1.5em;
border-top: 1.5em solid transparent;
border-bottom: 1.5em solid transparent;
border-left: 1em solid #ddd;
right: -1em;
}
#breadcrumbs-two a:hover::after{
border-left-color: #99db76;
}
#breadcrumbs-two .current,
#breadcrumbs-two .current:hover{
font-weight: bold;
background: #99db76;
}
#breadcrumbs-two .current::after{
border-left-color: #99db76;
}
#breadcrumbs-two .current::before{
border-color: #99db76 #99db76 #99db76 transparent;
}

or this css:
ul
{
padding-left:0;
width:100px;
}
ul li
{
display:block;
height:30px;
margin-bottom:8px;
position:relative;
background:gray;
}
ul li:before
{
content:'';
top:-1px;
left:10px;
border:1px solid blue;
border-width:4px 40px 20px 40px;
border-color: white transparent transparent transparent;
position:absolute;
}
ul li:first-child:before
{
border:none;
}
ul li:after
{
content:'';
bottom:-26px;
left:10px;
border:1px solid blue;
border-width:6px 40px 20px 40px;
border-color: red transparent transparent transparent;
position:absolute;
}
ul li:last-child:after
{
border:none;
}
for very simple arrows with less than a right angle. But IMHO it doesnt look good. Better will be to use small arrow with right angle and place it into middle of the block. Especially if you need more then only one word as a text.

I did something like this a little while ago...but I'm sure there is more than one way. Here's my first attempt.
Codepen Demo
HTML
<nav role='navigation'>
<ul>
<li>Step 1</li>
<li>Step 2</li>
<li>Step 3</li>
<li>Step 4</li>
</ul>
</nav>
CSS
* {
margin:0;
padding:0;
box-sizing:border-box;
}
ul {
list-style:none;
margin:25px;
}
li {
text-align:center;
margin-bottom:25px;
position:relative;
background:darkblue;
width:50px;
}
li:hover {
background:green;
}
a {
text-decoration:none;
font-weight:bold;
display:block;
color:white;
height:50px;
line-height:75px;
position:relative;
font-size:0.75em;
}
li:before,
li:after {
position:absolute;
content:"";
left:0;
border:25px solid transparent;
height:0;
width:0;
z-index: 25;
}
li:before {
top:0;
border-top-color:white;
}
li:after {
top:100%;
border-top-color:darkblue;
}
li:hover:after {
border-top-color:green;
}

Related

making a vertical line before text when hovered

I have created a list and when I hover a line should be displayed like this
See when hovered over Mobile & Tablets a vertical line is shown with orange color at the beginning
This is my simple code
ul {
list-style: none;
}
li {
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
background-color: grey;
}
li:hover {
background-color: white;
}
<ul>
<li>List</li>
<li>List</li>
</ul>
This should give your the result as shown in the example:
ul {
list-style: none;
}
li {
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
background-color: white;
border-top: solid 1px transparent;
border-bottom: solid 1px transparent;
border-left: solid 6px transparent;
}
li:hover {
background-color: white;
border-top-color: grey;
border-bottom-color: grey;
border-left-color: orange;
}
<ul>
<li>List</li>
<li>List</li>
</ul>
You have different possibilities to solve this. You can try the following solutions:
solution using box-shadow:
ul {
list-style:none;
padding:0;
}
li {
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
padding-left:5px;
background-color: grey;
border-top:1px solid transparent;
border-bottom:1px solid transparent;
}
li:hover {
background-color: white;
box-shadow:inset 3px 0px 0px 0px red;
border-top-color:grey;
border-bottom-color:grey;
}
<ul>
<li>List</li>
<li>List</li>
</ul>
solution using border-left:
ul {
list-style:none;
padding:0;
}
li {
border-left:3px solid transparent;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
padding-left:5px;
background-color: grey;
border-top:1px solid transparent;
border-bottom:1px solid transparent;
}
li:hover {
border-left-color:red;
background-color: white;
border-top-color:grey;
border-bottom-color:grey;
}
<ul>
<li>List</li>
<li>List</li>
</ul>
solution using linear-gradient:
ul {
list-style:none;
padding:0;
}
li {
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
padding-left:5px;
background-color: grey;
border-top:1px solid transparent;
border-bottom:1px solid transparent;
}
li:hover {
background:linear-gradient(to right, red 0px, red 3px, transparent 3px);
background-color: white;
border-top-color:grey;
border-bottom-color:grey;
}
<ul>
<li>List</li>
<li>List</li>
</ul>
All you need to do is add a thick orange border to the left side of the li element on hover:
ul {
list-style:none;
}
li {
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
background-color: grey;
}
li:hover {
background-color: white;
border-left: 5px solid orange;
}
<ul>
<li>List</li>
<li>List</li>
</ul>
you can give padding and a border for the same
li:hover
{
background-color: white;
border-left: 5px solid orange;
padding-left: 5px;
}
What you have to do is just add below CSS to your li:hover field,
li:hover{
border: 1px solid #cbcbcb;
border-left: 3px solid orange;
background-color: white;
color: orange;
}
Include a border from the beginning and then change it to the color you need.
ul,
li {
margin: 0;
padding: 0;
list-style: none;
}
li {
padding: 5px 0 5px 5px;
margin-bottom: 5px;
border: 1px solid transparent;
border-left-width: 5px;
}
li:hover {
cursor: pointer;
background-color: white;
border-color: lightgray;
border-left-color: orange;
}
<ul>
<li>List</li>
<li>List</li>
</ul>
You could use a css ::before pseudo-element. See code snippet.
ul {
list-style: none;
}
li {
position: relative;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
background-color: grey;
}
li:hover::before {
content: '';
width: 2px;
height: 100%;
position: absolute;
background-color: orange;
top: 0;
}
li:hover {
background-color: white;
}
<ul>
<li>List</li>
<li>List</li>
</ul>

how to draw inverted round corners on selected list item?

Lets assume a set of boxes one below the other separated by some border.
If I set one of the boxes, it should have top-left-border-radius and bottom-left-border-radius
Also for the above box, bottom right border radius should be there without disturbing the flow of border and also the box below the selected one should have top right border radius without disturbing the flow of the border.
Image provided.
try this https://plnkr.co/edit/dN4LqEQGIG6hmegl7DRV?p=preview
.box:nth-child(even){
border: 1px solid #000;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
border-right:none;
border-top:none;
border-bottom:none;
}
.box:nth-child(odd){
border: 1px solid #000;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
border-left:none;
margin-left:4px;
}
This should solve your problem:
div {
width: 100px;
height: 40px;
}
.first {
border-top: 1px solid #000;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
}
.second {
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-bottom-right-radius: 10px;
width: 92px;
margin-left: 8px;
}
.third {
border-left: 1px solid #000;
border-bottom: 1px solid #000;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
width: 92px;
}
.fourth {
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-top-right-radius: 10px;
}
<div class="first"></div>
<div class="second"></div>
<div class="third"></div>
<div class="fourth"></div>
Here is a pure css way to achieve this.
Following HTML structure will be needed for this:
<ul>
<li>
<span>1</span>
</li>
<li>
<span>2</span>
</li>
.....
.....
.....
<li>
<span>n</span>
</li>
</ul>
In this trick we will use :before and :after pseudo elements to draw round borders.
Output Image:
Note: This method will work if height of list items is fixed and same.
body {
background: linear-gradient(lightgreen, green);
margin: 0;
min-height: 100vh;
}
ul {
overflow: hidden;
list-style: none;
width: 30%;
margin: 20px 1%;
float: left;
padding: 0;
}
ul li {
position: relative;
}
ul li:before,
ul .active:after {
border: solid black;
border-width: 0 2px 2px 0;
position: absolute;
height: 100%;
bottom: 100%;
content: '';
width: 100%;
right: 0;
}
ul .active:before {
border-radius: 0 0 5px 0;
width: calc(100% - 10px);
}
ul .active:after {
border-radius: 0 5px 0 0;
border-width: 2px 2px 0 0;
width: calc(100% - 10px);
margin-top: -2px;
bottom: auto;
top: 100%;
}
ul li:last-child.active:after {
border-radius: 0;
}
ul .active + li:before {
display: none;
}
ul .active + li + li:before {
height: calc(100% - 10px);
}
ul li span {
padding: 5px 10px;
position: relative;
display: block;
z-index: 5;
}
ul li:first-child span {
border-top: 2px solid black;
}
ul li:first-child.active span {
border-top-left-radius: 5px;
}
ul li:last-child span {
border: solid black;
border-width: 0 2px 2px 0;
}
ul li:last-child.active span {
border-width: 0;
}
ul .active + li:last-child span {
border-right-width: 0;
}
ul .active span:before {
border: solid black;
border-width: 2px 0 2px 2px;
border-radius: 5px 0 0 5px;
position: absolute;
content: '';
width: 10px;
top: -2px;
bottom: 0;
left: 0;
}
<ul>
<li class="active"><span>1</span></li>
<li><span>2</span></li>
<li><span>3</span></li>
<li><span>4</span></li>
<li><span>5</span></li>
<li><span>6</span></li>
</ul>
<ul>
<li><span>1</span></li>
<li class="active"><span>2</span></li>
<li><span>3</span></li>
<li><span>4</span></li>
<li><span>5</span></li>
<li><span>6</span></li>
</ul>
<ul>
<li><span>1</span></li>
<li><span>2</span></li>
<li class="active"><span>3</span></li>
<li><span>4</span></li>
<li><span>5</span></li>
<li><span>6</span></li>
</ul>
<ul>
<li><span>1</span></li>
<li><span>2</span></li>
<li><span>3</span></li>
<li class="active"><span>4</span></li>
<li><span>5</span></li>
<li><span>6</span></li>
</ul>
<ul>
<li><span>1</span></li>
<li><span>2</span></li>
<li><span>3</span></li>
<li><span>4</span></li>
<li class="active"><span>5</span></li>
<li><span>6</span></li>
</ul>
<ul>
<li><span>1</span></li>
<li><span>2</span></li>
<li><span>3</span></li>
<li><span>4</span></li>
<li><span>5</span></li>
<li class="active"><span>6</span></li>
</ul>
from a list and a single pseudo, there is something to do too :
(tabindex is added for the demo, you can click or tab through item to see borders and backgrounds switching),
item's height and padding do not matter much but you need to mind the radius value and borders thickness , if necessary, to update margin and or coordonates to match the value used
ul {
background: linear-gradient(to left, white, #0F4782, #069ED5, white);
border-bottom: solid;
padding: 0;
margin: 0 1em;
}
li {
display: block;
border: solid;
border-left: none;
border-bottom: none;
padding: 0.5em;
}
li:focus,
li:active {
outline: none;
border: solid;
border-right: none;
position: relative;
left: -.5em;
margin-top: 3px;
margin-bottom: -3px;
border-radius: 0.5em 0 0 0.5em;
background: linear-gradient(to right, tomato, white)
}
li:focus + li,
li:active + li {
border-radius: 0 0.75em;
}
li:focus:before,
li:active:before {
content: '';
border-radius: 0.75em;
border: solid transparent;
border-bottom: solid;
position: absolute;
right: -8px;
bottom: 100%;
height: 0.75em;
width: 0.75em;
transform: rotate(-45deg);
;
}
li:focus i, li:active i {display:none;}
li:focus:after,
li:active:after {
content: '> focused';
font-weight:bold;
}
<ul>
<li tabindex="0">item <i>click me</i></li>
<li tabindex="0">item<br/> <i>click me</i></li>
<li tabindex="0">item <i>click me</i></li>
<li tabindex="0">item <i>click me</i></li>
<li tabindex="0">item <i>click me</i></li>
<li tabindex="0">item <i>click me</i></li>
</ul>
.box{
width:300px;
height:30px;
border:2px solid #000;
display:block;
overflow:hidden;
margin-left:10px;
}
#one,#two,#four{
border-left:none;
}
#two{
border-bottom-right-radius:20px;
}
#one,#three{
border-bottom:none;
}
#three{
border-top:none;
border-right:none;
border-bottom-left-radius:20px;
border-top-left-radius:20px;
margin-left:0px;
width:40px;
}
#four{
border-top-right-radius:20px;
}
<div id="one" class="box"></div>
<div id="two" class="box"></div>
<div id="three" class="box"></div>
<div id="four" class="box"></div>
ul {
list-style: none;
}
li {
padding:20px;
}
li:nth-child(1) {
border-right: 1px solid #000;
border-top: 1px solid;
border-bottom: 1px solid;
}
li:nth-child(2) {
border-right: 1px solid #000;
border-bottom: 1px solid;
border-bottom-right-radius: 15px;
margin-left: 13px;
}
li:nth-child(3) {
border-left: 1px solid;
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
border-bottom: 1px solid;
margin-right: 13px;
}
li:nth-child(4) {
border-right: 1px solid #000;
border-top-right-radius: 15px;
border-bottom: 1px solid;
}
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
Dear please check with this snippet , i just give you the perfect shape. This is exactly what you need check with the edges
.box1 {
width:300px;
height:100px;
border:1px solid #000;
border-left:0;
border-right-width:2px;
}
.box2 {
width:300px;
height:100px;
border-right:2px solid #000;
border-bottom-right-radius:20px;
border-bottom-left-radius:0px;
position:relative;
}
.box2::after {
position:absolute;
right:-2px;
width:30px;
height:30px;
border-bottom:2px solid #000;
border-right:2px solid #000;
border-bottom-right-radius:20px;
border-bottom-left-radius:0px;
bottom:0px;
content:"";
}
.box2::before {
position:absolute;
right:16px;
width:90%;
height:2px;
background:#000;
bottom:0px;
content:"";
}
.box3 {
width:281px;
height:100px;
border-bottom:2px solid #000;
border-left:2px solid #000;
border-top-left-radius:20px;
border-bottom-left-radius:20px;
position:relative;
}
.box3::after {
position:absolute;
left:-2px;
width:30px;
height:30px;
border-top:2px solid #000;
border-left:2px solid #000;
border-top-left-radius:20px;
border-bottom-left-radius:0px;
top:-2px;
content:"";
}
.box4 {
width:300px;
height:100px;
border-bottom:1px solid #000;
border-right:2px solid #000;
border-top-left-radius:20px;
border-top-right-radius:20px;
position:relative;
}
.box4::after {
position:absolute;
right:-2px;
width:30px;
height:30px;
border-top:2px solid #000;
border-right:2px solid #000;
border-top-right-radius:20px;
border-bottom-left-radius:0px;
top:-2px;
content:"";
}
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
<div class="box4"></div>

Css z index does not work with position absolute and ul

I am trying to make the ul above the rest of the content and the z index is not working.
I added the position property as needed to set z index but still does not work, what i am doing wrong?
How i can fix this?
ul {
list-style: none;
}
.nb-drop-down {
width: 400px;
position: relative;
}
.nb-drop-down ul {
width: 100%;
border: 1px solid #eee;
position: absolute;
z-index: 100;
}
.nb-drop-down button, .nb-drop-down li {
text-align: left;
line-height: 50px;
padding-left: 10px;
cursor: pointer;
}
.nb-drop-down button {
width: 100%;
background: transparent;
border: 1px solid #eee;
position: relative;
}
.nb-drop-down button::after {
content: '';
position: absolute;
border-style: solid;
right: 15px;
top: 50%;
-webkit-transform: translateY(-50%);
border-width: 10px 6.5px 0 6.5px;
border-color: #e3e3e3 transparent transparent transparent;
}
.nb-drop-down button:focus {
outline: none;
}
.nb-drop-down li:not(:last-child) {
border-bottom: 1px solid #eee;
}
<div class="nb-drop-down">
<button class="nb-main-item">Main Item</button>
<ul class="nb-list">
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
</ul>
</div>
<h1>hello</h1>
UL is above H1 (or everything else in general), but has transparent background. Set background, eg:
.nb-drop-down ul {background: white;}
http://jsfiddle.net/5ojk1ojq/

Navbar active link with a transparent triangle

You know how to do this using CSS?
In my navbar I would like to see a transparent triangle to the active link.
If I create a PNG image with a transparent triangle and use it like this:
background: rgba (0,0,0,0.4) url (triangle.png) no-repeat bottom center;
this does not work properly because under my triangle shows the transparent rgba color rgba(0,0,0,0.4) ...
I would like to do this to make a nice effect when scrolling the page. It is possibile?
Demo
You can use the :before and :after pseudo elements to achieve this effect.
<nav>
<ul>
<li class="active">homepage</li>
<li>option2</li>
<li>option3</li>
</ul>
</nav>
nav {
position: fixed;
background-color: rgba(0,0,0,.7);
display: block;
width: 100%;
padding: 10px 0;
color: white;
font-size: 1.5em;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
ul li {
float: left;
width: auto;
padding: 0 20px;
position: relative;
}
nav li:before,
nav li:after {
content: '';
position: absolute;
bottom: -35px;
left: 0;
right: 0;
height: 5px;
border: 10px transparent solid;
border-top-color: rgba(0,0,0,.7);
border-left-width: 0;
border-right-width: 0;
}
nav li:before {
right: 50%;
}
nav li:after {
left: 50%;
}
nav li.active:before {
border-right-width: 10px;
}
nav li.active:after {
border-left-width: 10px;
}
nav li:last-child:after { /* covers the bottom of the navigation bar all the way to the right */
right: -9999999px;
}
Another solution using links:
<nav>
<ul>
<li>homepage</li>
<li>option2</li>
<li>option3</li>
</ul>
</nav>
write css style for :active class
js. No jQuery and you even get the hover effect for free.
i think this will help you..
same concept but used differently for further reference refer here :
stackoverflow.com/questions/17327076/how-to-create-a-ul-with-a-triangle-for-the-active-row
Will post my solution. It's pretty complicated and though I don't know if there is other simpler way to make li>a nested elements be transparent for the background under ul. This solution uses :before/:after pseudo attributes.
I used this markup (how to avoid helper <i></i>?):
<header>
<ul class="clearfix">
<li><a class="active" href="">HOMEPAGE <i></i></a></li>
<li>CONTACT <i></i></li>
<li>GET OUT <i></i></li>
</ul>
</header>
and CSS:
header li a {
text-align: center;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
display: inline-block;
padding: 25px;
color: #FFF;
position: relative;
}
header li a:hover {
background: rgba(255, 255, 255, .2);
}
header li a i:after, header li a i:before {
content:'';
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 0;
display: none;
background: url(http://subtlepatterns.com/patterns/escheresque_ste.png);
background-attachment: fixed;
border-top: 15px solid rgba(0, 0, 0, .5);
}
header li a.active i:after, header li a.active i:before {
display: block;
}
header li a:hover i:after, header li a:hover i:before {
display: block;
border-top-color: rgba(255, 255, 255, .1);
}
header li a i:before {
margin-left: -15px;
border-right: 15px solid transparent;
}
header li a i:after {
border-left: 15px solid transparent;
}
Hopefully someone will get inspired one day.
Demo: http://jsfiddle.net/R9pKq/
<figure>
<div><div>
</figure>
css
figure{
width:400px;
height:320px;
background:skyblue url(http://img1.wikia.nocookie.net/__cb20140301204257/disney/images/4/49/Elsa-Anna.jpg);
border:4px solid rgba(0,0,0,.8);
margin:40px auto;
position:relative;
}
figure div{
position:absolute;
bottom:0px;
left:0px;
width:100%;
height:200px;
background:rgba(255,255,255,.1);
}
figure div:before{
content:'';
position:absolute;
width:0px;
height:0px;
left:50%;
top:-40px;
margin-left:-40px;
border-bottom:40px solid rgba(255,255,255,.1);
border-left:40px solid transparent;
border-right:40px solid transparent;
}
Demo
or if you want to apply it to a menu
<menu>
<li><a>Home</a></li>
<li><a>Work</a></li>
<li><a>Projects</a></li>
<li><a>Infos</a></li>
</menu>
css
menu{
margin-top:40px;
}
menu li{
float:left;
list-style:none;
position:relative;
}
menu li{
padding:20px; 40px;
}
menu li:hover:before{
content:'';
position:absolute;
width:0px;
height:0px;
left:50%;
top:-20px;
margin-left:-20px;
border-bottom:20px solid rgba(0,0,0,.8);
border-left:20px solid transparent;
border-right:20px solid transparent;
}
Demo with Hover
to use the active class jst change menu li:hover:before to menu li.active:before

Designing a CSS menu bar, 0 margins, but yet there is a gap

I have been working on this menu bar for a while, and I can't get rid of this ~5 pixel gap between my menu bar and the main body div.
I know it isn't a line break before the div (one of the similar problems I loooked up) because when I delete the menu bar, the div sits right at the top of the page.
I have also tried putting 0 margins in every single item related to my menu. I have no idea what I am doing wrong here.
Here's the test page: www.PartyArtisans.com/blank.php
and here's my css style sheet: http://www.partyartisans.com/style.css
Here's my menu bar CSS.
#menu ul,
#menu li,
#menu span,
#menu a {
padding: 0;
position: relative;
}
#menu:after,
#menu ul:after {
content: '';
display: block;
clear: both;
}
body {
background-color: #95BDFF;
}
#menu {
font-family: Helvetica, sans-serif;
font-size: 18px;
line-height: 24px;
text-align: center;
margin:0px auto 0px auto;
}
#menu ul ul {
display: none;
}
#menu ul li:hover > ul {
display: block;
}
#menu ul {
background: #FFFFFF;
background: linear-gradient(top, #FFFFFF 10%, #b87adfc 100%);
background: -moz-linear-gradient(top, #FFFFFF 10%, #b87adfc 100%);
background: -webkit-linear-gradient(top, #FFFFFF 10%,#b87adfc 100%);
box-shadow: 0px 0px 9px rgba(0,0,0,0.15);
padding:0px 20px 0px 20px;
margin:0px 0px 0px 0px;
-webkit-border-bottom-right-radius: 15px;
-webkit-border-bottom-left-radius: 15px;
-moz-border-radius-bottomright: 15px;
-moz-border-radius-bottomleft: 15px;
border-bottom-right-radius: 15px;
border-bottom-left-radius: 15px;
list-style: none;
position: relative;
display: inline-table;
width:920px;
}
#menu ul:after {
content: "";
clear: both;
display: block;
}
#menu ul li {
width:20%;
float:left;
}
#menu ul li:hover {
background: #FFFFFF;
background: linear-gradient(top, #FFFFFF 0%, #CCF0FF 100%);
background: -moz-linear-gradient(top, #FFFFFF 0%, #CCF0FF 100%);
background: -webkit-linear-gradient(top, #FFFFFF 0%,#CCF0FF 100%);
background-image: linear-gradient(#FFFFFF, #CCF0FF);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#CCF0FF',GradientType=0 ); /* IE6-9 */
}
#menu ul li:hover a {
color: #00C5FC;
}
#menu ul li a {
width:auto;
display: block;
padding: 10px 10px;
color: #00C5FC;
text-decoration: none;
}
#menu ul ul {
width:auto;
background: #E8F8FF;
border-radius: 0px;
padding: 0;
position: absolute;
top: 100%;
}
#menu ul ul li {
width:auto;
float: none;
border-top: 1px solid #6b727c;
border-bottom: 1px solid #575f6a;
position: relative;
}
#menu ul ul li a {
width:350px;
color: #00C5FC;
}
#menu ul ul li a:hover {
background: #333399;
color: #EEFFFF;
}
And here's the html, though I don't imagine that would have anything to do with it:
<nav id="menu">
<ul>
<li>Home</li>
<li>Information
<ul>
<li>About Dan The Balloon Man</li>
<li>Looking for a job?</li>
</ul>
</li>
<li>Services
<ul>
<li>Balloon Twisting Entertainment</li>
<li>Face Painting</li>
<li>Interactive Music with Miss Mary Kate</li>
<li>Party Artisans Cover Band</li>
<li>Balloon Decor and Large Sculptures</li>
</ul>
</li>
<li>Reviews</li>
<li>Book us!</li>
</ul>
</nav>
I know it's a little bit of a mess, I copied it and tinkered with it for a while to learn CSS as I go.
Solved: I managed to figure it out after downloading Firebug.
I changed
line-height: 24px;
to
line-height: 10px;
and how it looks how I want it to look. Shrug
Replace line-height: 24px; in the #menu div with line-height: 0px;
edit your style.css (Info taken from the website, not the code posted here)
you have told the #MainBody to have a 5pix border all around
#MainBody {
background-image: url("http://www.partyartisans.com/icons/pattern8-pattern-43aSunset.png");
border-bottom-color: white;
border-bottom-style: solid;
border-bottom-width: 5px;
border-left-color: white;
border-left-style: solid;
border-left-width: 5px;
border-right-color: white;
border-right-style: solid;
border-right-width: 5px;
border-top-color: white; // get rid of this line
border-top-style: solid; // and this
border-top-width: 5px; // and this one too
margin-bottom: 0px;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
vertical-align: top;
width: 900px;
}
and the MainBody box should connect to the menu