I have a css menu (the source for which I downloaded because I don't know squat about css) contained in a div
<div id='cssmenu' style='float:right;'>
<ul>
<li id='index'><a href='index.php'><span>Home</span></a></li>
<li id='aboutus'><a href='aboutus.php'><span>About Us</span></a></li>
<li id='gallery'><a href='gallery.php'><span>Galley</span></a></li>
<li id='videos'><a href='videos.php'><span>Videos</span></a></li>
<li id='links'><a href='links.php'><span>Links</span></a></li>
<li id='contact'><a href='contact.php'><span>Contact</span></a></li>
</ul>
</div>
I have this inside of a <td> with a fixed width (let's say 500px for simplicity). I adjusted the padding in the css to get the width to fit nicely... at least in Firefox. When I look at it in Chrome, the last menu item overflows the width of the table cell and ends up below the rest of the menu.
My question is, how do I make the menu items equally spaced across the width of the table? setting padding to 0px makes everything look tiny and squished, and I still want the vertical padding.
here is my css (sorry, I know it's long)
#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a {
margin: 0;
padding: 0;
border: 0;
list-style: none;
line-height: 1;
display: block;
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#cssmenu {
width: 100%;
font-family: Helvetica, Arial, sans-serif;
color: #ffffff;
padding:0px;
display:table;
}
#cssmenu.align-right ul li {
float: right;
border-right: 0;
border-left: 1px solid rgba(0, 0, 0, 0.22);
}
#cssmenu.align-right ul li a {
border-right: 0;
border-left: 1px solid rgba(255, 255, 255, 0.15);
}
#cssmenu ul {
background: #222222;
/* Old browsers */
background: -moz-linear-gradient(bottom, #000000 0%, #222222 50%, #3c3c3c 51%, #393939 78%, #888888 100%);
background: -webkit-linear-gradient(bottom, #000000 0%, #222222 50%, #3c3c3c 51%, #393939 78%, #888888 100%);
background: -o-linear-gradient(bottom, #000000 0%, #222222 50%, #3c3c3c 51%, #393939 78%, #888888 100%);
background: -ms-linear-gradient(bottom, #000000 0%, #222222 50%, #3c3c3c 51%, #393939 78%, #888888 100%);
background: linear-gradient(to top, #000000 0%, #222222 50%, #3c3c3c 51%, #393939 78%, #888888 100%);
width: 100%;
display:table-row-group;
}
#cssmenu:after
#cssmenu ul:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
#cssmenu ul li {
float: left;
display: table-cell;
vertical-align: middle;
/*width: auto; */
border-right: 1px solid rgba(0, 0, 0, 0.22);
z-index: 1;
}
#cssmenu ul li::after {
content: "";
width: 100%;
height: 8px;
position: absolute;
border-top-left-radius: 50% 4px;
border-top-right-radius: 50% 4px;
background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 60%, #222222 61%, #222222 100%);
background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 60%, #222222 61%, #222222 100%);
background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 60%, #222222 61%, #222222 100%);
background: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 60%, #222222 61%, #222222 100%);
background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
z-index: 2;
bottom: 10px;
}
#cssmenu ul li a {
display: block;
padding: 10px 11px;
text-decoration: none;
font-size: 11px;
text-transform: uppercase;
color: #ffffff;
border-right: 1px solid rgba(255, 255, 255, 0.15);
z-index: 3;
}
#cssmenu ul li a:hover,
#cssmenu ul li.active a {
color: #ffffff;
}
#cssmenu ul li:hover,
#cssmenu ul li.active {
background: #1275ae;
/* Old browsers */
background: -moz-linear-gradient(bottom, #0b4669 0%, #1275ae 50%, #1794dc 51%, #1691d8 78%, #98d2f4 100%);
background: -webkit-linear-gradient(bottom, #0b4669 0%, #1275ae 50%, #1794dc 51%, #1691d8 78%, #98d2f4 100%);
background: -o-linear-gradient(bottom, #0b4669 0%, #1275ae 50%, #1794dc 51%, #1691d8 78%, #98d2f4 100%);
background: -ms-linear-gradient(bottom, #0b4669 0%, #1275ae 50%, #1794dc 51%, #1691d8 78%, #98d2f4 100%);
background: linear-gradient(to top, #0b4669 0%, #1275ae 50%, #1794dc 51%, #1691d8 78%, #98d2f4 100%);
}
#cssmenu ul li:hover::after,
#cssmenu ul li.active::after {
background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 60%, #1275ae 61%, #1275ae 100%);
background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 60%, #1275ae 61%, #1275ae 100%);
background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 60%, #1275ae 61%, #1275ae 100%);
background: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 60%, #1275ae 61%, #1275ae 100%);
background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
}
It would be easy if you are using table, but here you have ul so i suggest you to use calc() function if you can comfort with it. or wait for some another solution. I have tested it with your code like width: calc(100%/ 6); and it works great.
I had add this rule to #cssmenu ul li
Try this
ul{
display:table;
table-layout: fixed;
width: 100%;
}
li{
display:table-cell;
display: table-cell;
float: none;
}
http://jsfiddle.net/upj6oe0z/
I hope it works.
Related
I'm modifying some CSS/HTML that I found here that displays a iOS style chat message with bubbles. I wanted to swap the alignment of the blue and green bubbles which I've managed to do but the only thing I'm not sure about is how to change the little "handle" that appears in the bottom left and right corners around as well.
Here's how it currently looks:
/* Bit of normalisation */
body {
background-color: #eee;
color: #222;
font: 0.8125em/1.5 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
img {
display: block;
height: auto;
max-width: 100%;
}
.container {
padding: 40px 20px;
margin: 0 auto;
width: 400px;
}
/* .bubble */
.bubble {
background-image: linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -o-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -moz-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -ms-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.25, rgb(210,244,254)),
color-stop(1, rgb(149,194,253))
);
border: solid 1px rgba(0, 0, 0, 0.5);
/* vendor rules */
border-radius: 20px;
/* vendor rules */
box-shadow: inset 0 5px 5px rgba(255, 255, 255, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
/* vendor rules */
box-sizing: border-box;
clear: both;
float: right;
margin-bottom: 20px;
padding: 8px 30px;
position: relative;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
width: auto;
max-width: 100%;
word-wrap: break-word;
}
.bubble:before, .bubble:after {
border-radius: 20px / 10px;
content: '';
display: block;
position: absolute;
}
.bubble:before {
border: 10px solid transparent;
border-bottom-color: rgba(0, 0, 0, 0.5);
bottom: 0;
left: -7px;
z-index: -2;
}
.bubble:after {
border: 8px solid transparent;
border-bottom-color: #d2f4fe;
bottom: 1px;
left: -5px;
}
.bubble--alt {
background-image: linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -o-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -moz-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -ms-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.25, rgb(172,228,75)),
color-stop(1, rgb(122,205,71))
);
float: left;
}
.bubble--alt:before {
border-bottom-color: rgba(0, 0, 0, 0.5);
border-radius: 20px / 10px;
left: auto;
right: -7px;
}
.bubble--alt:after {
border-bottom-color: #ace44b;
border-radius: 20px / 10px;
left: auto;
right: -5px;
}
<div class="container">
<div class="bubble">
Blue text bubble
</div>
<div class="bubble bubble--alt">
Green text bubble
</div>
<div class="bubble">
A bubble containing lots and lots and lots and lots of content on multiple lines
</div>
<div class="bubble bubble--alt">
Bubble with image
<img src="http://placekitten.com/800/600" alt="" />
</div>
<div class="bubble">
Bubblewitharidiculouslylongwordwhichwrapseffortlesslyontotwolines
</div>
</div>
I can't work out how to swap the little handles in the bottom corners of each bubble so they are on the opposite side. I'd like the blue one appear from the bottom right corner and the green one appearing from the bottom left corner.
Here you go full code:
Under .bubble:before{..} and .bubble:after {..} you have used left property that should be of right and vice-versa for 'bubble--alt:before{..}andbubble--alt:after{..}`.
body {
background-color: #eee;
color: #222;
font: 0.8125em/1.5 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
img {
display: block;
height: auto;
max-width: 100%;
}
.container {
padding: 40px 20px;
margin: 0 auto;
width: 400px;
}
/* .bubble */
.bubble {
background-image: linear-gradient(bottom, rgb(210, 244, 254) 25%, rgb(149, 194, 253) 100%);
background-image: -o-linear-gradient(bottom, rgb(210, 244, 254) 25%, rgb(149, 194, 253) 100%);
background-image: -moz-linear-gradient(bottom, rgb(210, 244, 254) 25%, rgb(149, 194, 253) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(210, 244, 254) 25%, rgb(149, 194, 253) 100%);
background-image: -ms-linear-gradient(bottom, rgb(210, 244, 254) 25%, rgb(149, 194, 253) 100%);
background-image: -webkit-gradient( linear, right bottom, right top, color-stop(0.25, rgb(210, 244, 254)), color-stop(1, rgb(149, 194, 253)));
border: solid 1px rgba(0, 0, 0, 0.5);
/* vendor rules */
border-radius: 20px;
/* vendor rules */
box-shadow: inset 0 5px 5px rgba(255, 255, 255, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
/* vendor rules */
box-sizing: border-box;
clear: both;
float: right;
margin-bottom: 20px;
padding: 8px 30px;
position: relative;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
width: auto;
max-width: 100%;
word-wrap: break-word;
}
.bubble:before,
.bubble:after {
border-radius: 20px / 10px;
content: '';
display: block;
position: absolute;
}
.bubble:before {
border: 10px solid transparent;
border-bottom-color: rgba(0, 0, 0, 0.5);
bottom: 0;
right: -7px;
z-index: -2;
}
.bubble:after {
border: 8px solid transparent;
border-bottom-color: #d2f4fe;
bottom: 1px;
right: -5px;
}
.bubble--alt {
background-image: linear-gradient(bottom, rgb(172, 228, 75) 25%, rgb(122, 205, 71) 100%);
background-image: -o-linear-gradient(bottom, rgb(172, 228, 75) 25%, rgb(122, 205, 71) 100%);
background-image: -moz-linear-gradient(bottom, rgb(172, 228, 75) 25%, rgb(122, 205, 71) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(172, 228, 75) 25%, rgb(122, 205, 71) 100%);
background-image: -ms-linear-gradient(bottom, rgb(172, 228, 75) 25%, rgb(122, 205, 71) 100%);
background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0.25, rgb(172, 228, 75)), color-stop(1, rgb(122, 205, 71)));
float: left;
}
.bubble--alt:before {
border-bottom-color: rgba(0, 0, 0, 0.5);
border-radius: 20px / 10px;
right: auto;
left: -7px;
}
.bubble--alt:after {
border-bottom-color: #ace44b;
border-radius: 20px / 10px;
right: auto;
left: -5px;
}
<div class="container">
<div class="bubble">
Blue text bubble
</div>
<div class="bubble bubble--alt">
Green text bubble
</div>
<div class="bubble">
A bubble containing lots and lots and lots and lots of content on multiple lines
</div>
<div class="bubble bubble--alt">
Bubble with image
<img src="http://placekitten.com/800/600" alt="" />
</div>
<div class="bubble">
Bubblewitharidiculouslylongwordwhichwrapseffortlesslyontotwolines
</div>
</div>
Updated your code. Is this what you want?
/* Bit of normalisation */
body {
background-color: #eee;
color: #222;
font: 0.8125em/1.5 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
img {
display: block;
height: auto;
max-width: 100%;
}
.container {
padding: 40px 20px;
margin: 0 auto;
width: 400px;
}
/* .bubble */
.bubble {
background-image: linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -o-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -moz-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -ms-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.25, rgb(210,244,254)),
color-stop(1, rgb(149,194,253))
);
border: solid 1px rgba(0, 0, 0, 0.5);
/* vendor rules */
border-radius: 20px;
/* vendor rules */
box-shadow: inset 0 5px 5px rgba(255, 255, 255, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
/* vendor rules */
box-sizing: border-box;
clear: both;
float: right;
margin-bottom: 20px;
padding: 8px 30px;
position: relative;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
width: auto;
max-width: 100%;
word-wrap: break-word;
}
.bubble:before, .bubble:after {
border-radius: 20px / 10px;
content: '';
display: block;
position: absolute;
}
.bubble:before {
border: 10px solid transparent;
border-bottom-color: rgba(0, 0, 0, 0.5);
bottom: 0;
right: -7px;
z-index: -2;
}
.bubble:after {
border: 8px solid transparent;
border-bottom-color: #d2f4fe;
bottom: 1px;
right: -5px;
}
.bubble--alt {
background-image: linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -o-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -moz-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -ms-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.25, rgb(172,228,75)),
color-stop(1, rgb(122,205,71))
);
float: left;
}
.bubble--alt:before {
border-bottom-color: rgba(0, 0, 0, 0.5);
border-radius: 20px / 10px;
right: auto;
left: -7px;
}
.bubble--alt:after {
border-bottom-color: #ace44b;
border-radius: 20px / 10px;
right: auto;
left: -5px;
}
<div class="container">
<div class="bubble">
Blue text bubble
</div>
<div class="bubble bubble--alt">
Green text bubble
</div>
<div class="bubble">
A bubble containing lots and lots and lots and lots of content on multiple lines
</div>
<div class="bubble bubble--alt">
Bubble with image
<img src="http://placekitten.com/800/600" alt="" />
</div>
<div class="bubble">
Bubblewitharidiculouslylongwordwhichwrapseffortlesslyontotwolines
</div>
</div>
I am using some css styled checkboxes and want to have a parent container (I am using a div) to scroll when they overflow a certain height. I am currently using this:
/**
* Menu Styles
*/
.fieldset-auto-width {
display: inline-block;
}
.menu_header
{
vertical-align:middle;
background-color:#d0eace;
padding-top:24px;
padding-bottom:24px;
padding-left:24px;
padding-right:24px;
width:500px;
}
.menu_button
{
padding-top:12px;
padding-left:8px;
width:50px;
vertical-align:middle;
}
.menu_description
{
padding-top:12px;
padding-left:8px;
padding-right:8px;
width:400px;
}
.created_by
{
display:inline-block;
float:right;
}
input,.container
{
background-color:white;
}
select
{
color: #000;
font-size: 12px;
background: transparent;
/*-webkit-appearance: none;*/
}
button, option {
background-color: white;/*#d0eace;*/
}
input[type=radio] {
visibility: hidden;
}
/**
* frnakRadio Buttons!
*/
.frnakRadio {
width: 24px;
height: 24px;
background: #ddd;
margin: 10px 10px;
border-radius: 100%;
position: absolute;
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
}
/**
* Create the checkbox button
*/
.frnakRadio label {
display: inline-block;
width: 18px;
height: 18px;
border-radius: 100px;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-o-transition: all .5s ease;
-ms-transition: all .5s ease;
transition: all .5s ease;
cursor: pointer;
position: relative;
top: 3px;
left: 3px;
z-index: 1;
background: #333;
-webkit-box-shadow:inset 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow:inset 0px 1px 3px rgba(0,0,0,0.5);
box-shadow:inset 0px 1px 3px rgba(0,0,0,0.5);
}
/**
* Create the checked state
*/
.frnakRadio input[type=radio]:checked + label {
background: #26ca28;
}
.checkname
{
display: block;
margin: 10px 35px;
}
input[type=text] {
height:2.2em;
padding:5px 5px;
margin-bottom: 10px ;
border-radius:.75em;
-moz-border-radius:.5em;
-webkit-border-radius:.5em;
text-transform:none;
width:200px;
background:-webkit-gradient(linear, left top, left 25, from(#FFF), color-stop(1%,#FFF), to(#d0eace));
background:-moz-linear-gradient(right, #EEEDEE, #d0eace); /* For Firefox 3.6 to 15 */
color:#000;
font-size:.9em;
}
input[type=text]:focus{
box-shadow:1px 1px 10px #446;
outline:none;
}
.crunch:hover
{
background-color: #d0eace;
font-weight:bold;
}
.centercontainer {
/* Internet Explorer 10 */
display:-ms-flexbox;
-ms-flex-pack:center;
-ms-flex-align:center;
/* Firefox */
display:-moz-box;
-moz-box-pack:center;
-moz-box-align:center;
/* Safari, Opera, and Chrome */
/*display:-webkit-box;
-webkit-box-pack:center;
-webkit-box-align:center;*/
/* W3C */
display:box;
box-pack:center;
box-align:center;
display: inline-block;
}
.status
{
border-radius: 100%;
margin:0px 20px;
border: 1px solid black;
width: 15px;
height: 15px;
float:center;
}
.queued
{
background: yellow;
}
.running
{
background:green;
}
.failed
{
background:red;
}
.key
{
float: left;
width: 15px;
text-align: left;
margin: 2px 2px;
margin-left:25px;
display: inline-block;
}
.keytext
{
width: 80px;
float: left;
text-align: left;
margin: 2px 2px;
display: inline-block;
font-size:14px;
font:Times;
}
.helper {
position: relative;
padding: 5px;
width: 15px; height:15px;
cursor:pointer;
}
#loading-image {
margin:0 auto;
background-color: #c0dabd;
width: 128px;
height: 128px;
z-index: 50;
position:absolute;
left:45%;
top:40%;
margin:-0px 0 0 -0px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px; /* future proofing */
-khtml-border-radius: 10px;
}
//FRNAKCHECK!!!
input[type=checkbox] {
visibility: hidden;
}
.frnakcheckbox {
width: 24px;
height: 22px;
background: #fcfff4;
background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead',GradientType=0 );
margin: -12px 5px auto;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
position: absolute;
}
.frnakcheckbox label {
cursor: pointer;
position: absolute;
width: 20px;
height: 20px;
left: 2px;
top: 0px;
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
background: -webkit-linear-gradient(top, #222 0%, #45484d 100%);
background: -moz-linear-gradient(top, #222 0%, #45484d 100%);
background: -o-linear-gradient(top, #222 0%, #45484d 100%);
background: -ms-linear-gradient(top, #222 0%, #45484d 100%);
background: linear-gradient(top, #222 0%, #45484d 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#222', endColorstr='#45484d',GradientType=0 );
}
.frnakcheckbox label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
content: '';
position: absolute;
width: 16px;
height: 16px;
background: #00bf00;
background: -webkit-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -moz-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -o-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -ms-linear-gradient(top, #00bf00 0%, #009400 100%);
background: linear-gradient(top, #00bf00 0%, #009400 100%);
top: 2px;
left: 2px;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
}
.frnakcheckbox label:hover::after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
filter: alpha(opacity=30);
opacity: 0.3;
}
.frnakcheckbox input[type=checkbox]:disabled{
background: #FFFFFF;
background: -webkit-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -moz-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -o-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -ms-linear-gradient(top, #ffffff 0%, #009400 100%);
background: linear-gradient(top, #ffffff 0%, #009400 100%);
}
.frnakcheckbox input[type=checkbox]:checked + label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
.checklabel {
margin: -10px 40px auto;
}
<div id="" style="overflow:auto; height:300px; display: inline-block;">
<b>Sample Text:</b><span class="helper" id="help1" style="color:blue;"><b>?</b></span>
<br>
<br>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522"></label>
</div>
<div class="checklabel">522</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523"></label>
</div>
<div class="checklabel">523</div>
<br>
</div>
This ends up looking like this: http://imgur.com/EPZ3SnQ
Notice that the actual check boxes aren't contained by the div but the labels are!
This is the CSS for the radio buttons: http://pastebin.com/up29LWCD
I am new to css and haven't quite gotten to understand how positioning works. Any help would be appreciated! I have tried a varying combination of style tags with no real progress...
They seem to work fine if you use them in a container and set the overflow?
/**
* Menu Styles
*/
.container {
margin: 10px;
border: 1px solid black;
height: 100px;
width: 100px;
overflow-y: scroll;
}
/**
* FRNAKCHECK
*/
.frnakcheckbox {
width: 24px;
height: 22px;
background: #fcfff4;
background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fcfff4', endColorstr='#b3bead', GradientType=0);
margin: -12px 5px auto;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
position: absolute;
}
.frnakcheckbox label {
cursor: pointer;
position: absolute;
width: 20px;
height: 20px;
left: 2px;
top: 0px;
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 1);
-moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 1);
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 1);
background: -webkit-linear-gradient(top, #222 0%, #45484d 100%);
background: -moz-linear-gradient(top, #222 0%, #45484d 100%);
background: -o-linear-gradient(top, #222 0%, #45484d 100%);
background: -ms-linear-gradient(top, #222 0%, #45484d 100%);
background: linear-gradient(top, #222 0%, #45484d 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#222', endColorstr='#45484d', GradientType=0);
}
.frnakcheckbox label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
content: '';
position: absolute;
width: 16px;
height: 16px;
background: #00bf00;
background: -webkit-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -moz-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -o-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -ms-linear-gradient(top, #00bf00 0%, #009400 100%);
background: linear-gradient(top, #00bf00 0%, #009400 100%);
top: 2px;
left: 2px;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
}
.frnakcheckbox label:hover::after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
filter: alpha(opacity=30);
opacity: 0.3;
}
.frnakcheckbox input[type=checkbox]:disabled {
background: #FFFFFF;
background: -webkit-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -moz-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -o-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -ms-linear-gradient(top, #ffffff 0%, #009400 100%);
background: linear-gradient(top, #ffffff 0%, #009400 100%);
}
.frnakcheckbox input[type=checkbox]:checked + label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
.checklabel {
margin: -10px 40px auto;
}
<b>Sample Text:</b>
<span class="helper" id="help1" style="color:blue;"><b>?</b></span>
<div class="container">
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522">522</label>
</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523">523</label>
</div>
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522">522</label>
</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523">523</label>
</div>
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522">522</label>
</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523">523</label>
</div>
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522">522</label>
</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523">523</label>
</div>
<br>
</div>
I have a menu that is working fine, but I want put a new sublevel on it, and if I put directly, when new options show they hide the othes option of menu.
here a pic http://www.potrusmaximus.uphero.com/dudas/menu.jpg
I want that new options show it next to the selected not down.
thx
Here my css and Html.
#menu-bar {
display: inline-block;
}
html[xmlns] #menu-bar {
display: block;
}
* html #menu-bar {
height: 1%;
}
#menu-bar {
width: 1010px;
margin: 3px 0px 0px 0px;
padding: 0px 5px 5px 5px !important;
max-height: 42px;
line-height: 100%;
border-radius: 43px;
-webkit-border-radius: 43px;
-moz-border-radius: 43px;
box-shadow: 2px 2px 14px #949494;
-webkit-box-shadow: 2px 2px 14px #949494;
-moz-box-shadow: 2px 2px 14px #949494;
background: #f7f7f7;
background: -moz-linear-gradient(top, #f7f7f7 0%, #c4c4c4 16%, #666666 39%, #666666 56%, #545454 68%, #292929 100%);
background: -webkit-gradient(left top, left bottom, color-stop(0%, #f7f7f7), color-stop(16%, #c4c4c4), color-stop(39%, #666666), color-stop(56%, #666666), color-stop(68%, #545454), color-stop(100%, #292929));
background: -webkit-linear-gradient(top, #f7f7f7 0%, #c4c4c4 16%, #666666 39%, #666666 56%, #545454 68%, #292929 100%);
background: -o-linear-gradient(top, #f7f7f7 0%, #c4c4c4 16%, #666666 39%, #666666 56%, #545454 68%, #292929 100%);
background: -ms-linear-gradient(top, #f7f7f7 0%, #c4c4c4 16%, #666666 39%, #666666 56%, #545454 68%, #292929 100%);
background: linear-gradient(to bottom, #f7f7f7 0%, #c4c4c4 16%, #666666 39%, #666666 56%, #545454 68%, #292929 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#f7f7f7", endColorstr="#292929", GradientType=0 );
border: solid 2px #B8B8B8;
position:relative;
z-index:999;
}
#menu-bar li { /* define los li*/
margin: 0px 8px 6px 8px;
padding: 0px 18px 0px 17px !important;
float: left;
position: relative;
list-style: none;
}
#menu-bar a { /*define los enlace*/
font-weight: bolder;
font-family: georgia;
font-style: normal;
font-size: 15px;
color: #EDEBEB;
text-decoration: none;
display: block;
padding: 15px 10px 10px 10px !important;
margin-bottom: 6px;
border-radius: 29px;
-webkit-border-radius: 29px;
-moz-border-radius: 29px;
text-shadow: 2px 2px 3px #000000;
}
#menu-bar li ul li a {
margin: 0;
}
/*#menu-bar .active a, */#menu-bar li:hover > a {
background: #ffffff;
background: -moz-radial-gradient(center, ellipse cover, #ffffff 0%, #ffffff 18%, #ebe8eb 32%, #d2d0d2 51%, #9a989a 74%, #434243 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #ffffff), color-stop(18%, #ffffff), color-stop(32%, #ebe8eb), color-stop(51%, #d2d0d2), color-stop(74%, #9a989a), color-stop(100%, #434243));
background: -webkit-radial-gradient(center, ellipse cover, #ffffff 0%, #ffffff 18%, #ebe8eb 32%, #d2d0d2 51%, #9a989a 74%, #434243 100%);
background: -o-radial-gradient(center, ellipse cover, #ffffff 0%, #ffffff 18%, #ebe8eb 32%, #d2d0d2 51%, #9a989a 74%, #434243 100%);
background: -ms-radial-gradient(center, ellipse cover, #ffffff 0%, #ffffff 18%, #ebe8eb 32%, #d2d0d2 51%, #9a989a 74%, #434243 100%);
background: radial-gradient(ellipse at center, #ffffff 0%, #ffffff 18%, #ebe8eb 32%, #d2d0d2 51%, #9a989a 74%, #434243 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#ffffff", endColorstr="#434243", GradientType=1 );
color: #141414;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
text-shadow: 2px 2px 3px #363636;
}
#menu-bar ul li:hover a, #menu-bar li:hover li a { /* coplores iluminacion*/
background: none;
border: none;
color: #ebebeb;
-box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
}
#menu-bar ul a:hover { /*elementos submenu seleccionados*/
background: #0399D4 !important;
background: linear-gradient(top, #87ECEC, #0186BA) !important;
background: -ms-linear-gradient(top, #87ECEC, #0186BA) !important;
background: -webkit-gradient(linear, left top, left bottom, from(#87ECEC), to(#0186BA)) !important;
background: -moz-linear-gradient(top, #87ECEC, #0186BA) !important;
color: #141414 !important;
border-radius: 29px;
-webkit-border-radius: 0;
-moz-border-radius: 0;
text-shadow: 2px 2px 3px #FFFFFF;
}
#menu-bar ul { /*define la caja del submenu*/
background: #262626;
background: -moz-linear-gradient(top, #262626 0%, #5e5e5e 31%, #525252 45%, #050505 100%);
background: -webkit-gradient(left top, left bottom, color-stop(0%, #262626), color-stop(31%, #5e5e5e), color-stop(45%, #525252), color-stop(100%, #050505));
background: -webkit-linear-gradient(top, #262626 0%, #5e5e5e 31%, #525252 45%, #050505 100%);
background: -o-linear-gradient(top, #262626 0%, #5e5e5e 31%, #525252 45%, #050505 100%);
background: -ms-linear-gradient(top, #262626 0%, #5e5e5e 31%, #525252 45%, #050505 100%);
background: linear-gradient(to bottom, #262626 0%, #5e5e5e 31%, #525252 45%, #050505 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#262626", endColorstr="#050505", GradientType=0 );
display: none;
margin: 0;
padding: 0 !important;
width: 201px;
position: absolute;
top: 42px;
left: 0;
border: solid 2px #B8B8B8;
border-radius: 29px;
-webkit-border-radius: 29px;
-moz-border-radius: 29px;
-webkit-box-shadow: 2px 2px 3px #949494;
-moz-box-shadow: 2px 2px 3px #949494;
box-shadow: 2px 2px 3px #949494;
}
#menu-bar li:hover > ul {
display: block;
}
#menu-bar ul li {
float: none;
margin: 0;
padding: 0 !important;
}
#menu-bar ul a { /* enlaces submenus*/
padding:10px 1px 10px 15px !important;
color:#242424;
font-size:12px;
font-style:normal;
font-family:georgia;
font-weight: bolder;
text-shadow: 2px 2px 3px #b8b2b8;
}
#menu-bar ul li:first-child > a {
border-top-left-radius: 29px;
-webkit-border-top-left-radius: 29px;
-moz-border-radius-topleft: 29px;
border-top-right-radius: 29px;
-webkit-border-top-right-radius: 29px;
-moz-border-radius-topright: 29px;
}
#menu-bar ul li:last-child > a {
border-bottom-left-radius: 29px;
-webkit-border-bottom-left-radius: 29px;
-moz-border-radius-bottomleft: 29px;
border-bottom-right-radius: 29px;
-webkit-border-bottom-right-radius: 29px;
-moz-border-radius-bottomright: 29px;
}
#menu-bar:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
<ul id="menu-bar">
<li class="active">POTRUS MAXIMUS</li>
<li>CODEX & DATASLATES</li>
<li>LISTAS
<ul>
<li>1850 Puntos</li>
<li>1500 Puntos</li>
<li>Por raza</li>
</ul>
</li>
<li>BIBLIOTECA
<ul>
<li>Horus Heresy</li>
<li>Warhammer 40K</li>
<li>Warhammer Fantasy</li>
<li>Fantasia Épica</li>
<li>Ciencia Ficción</li>
<li>Otros</li>
</ul>
</li>
<li>REVISTAS
<ul>
<li>White Dwarf Weekly
<ul>
<li>ISSUES 1-42
<li>ISSUES 43-84
</li></li></ul>
</li>
<li>Otras</li>
</ul>
</li>
<li>TUTORIALES</li>
</ul>
i can fix the sub menu design if you want to, but in the general idea, this it what you'r looking for?
#menu-bar ul ul
{
top: 0;
left: 100%;
}
#menu-bar li:hover > ul
{
display: block;
}
live example: http://jsfiddle.net/r9Lxodvb/2/
here is my css menu code. i see empty space in menu when i move mouse over menu item. i tried to find some solutions. i think you can help, please heeeeelp
http://www.picz.ge/img/s3/1312/13/f/f85b3e9ef429.jpg here is a picture of it
HTML CODE
<div id="navcon">
<div id="nav">
<ul>
<li class="first">მთავარი</li>
<li> რეგისტრაცია</li>
<li>გალერეა</li>
<li>ჩვენ შესახებ</li>
<li>კონტაქტი</li>
</ul>
</div>
</div>
CSS CODE
#navcon {
background: #4a4a4a url(menu_assets/images/grad_dark.png) repeat-x left top;
background: -moz-linear-gradient(top, #cee7f7 0%, #10a5da 50%, #0577a8 51%, #3ebdea 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #8a8a8a), color-stop(50%, #707070), color-stop(51%, #626262), color-stop(100%, #787878));
background: -webkit-linear-gradient(top, #cee7f7 0%, #10a5da 50%, #0577a8 51%, #3ebdea 100%);
background: -o-linear-gradient(top, #cee7f7 0%, #10a5da 50%, #0577a8 51%, #3ebdea 100%);
background: -ms-linear-gradient(top, #cee7f7 0%, #10a5da 50%, #0577a8 51%, #3ebdea 100%);
background: linear-gradient(to bottom, #cee7f7 0%, #10a5da 50%, #0577a8 51%, #3ebdea 100%);
width: 100%;
opacity: 0.6;
}
#nav {
width: 100%;
height: 56px;
position: relative;
color: white;
font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;
margin: 0px auto;
font-size: .9em;
text-align: center;
}
#nav ul {
list-style-type: none;
text-align:center;
list-style: none;
}
#nav > ul > li {
position: relative;
display: inline-block;
}
#nav ul li a {
border-right: 1px solid #5d5d5d;
padding: 20px;
display: inline-block;
text-align: center;
color: white;
text-decoration: none;
opacity: 1.6;
}
#nav > ul > li > a:hover {
background: #8a8a8a url(menu_assets/images/grad_dark.png) repeat-x left bottom;
background: -moz-linear-gradient(top, #646464 0%, #4a4a4a 50%, #3b3b3b 51%, #525252 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #646464), color-stop(50%, #4a4a4a), color-stop(51%, #3b3b3b), color-stop(100%, #525252));
background: -webkit-linear-gradient(top, #646464 0%, #4a4a4a 50%, #3b3b3b 51%, #525252 100%);
background: -o-linear-gradient(top, #646464 0%, #4a4a4a 50%, #3b3b3b 51%, #525252 100%);
background: -ms-linear-gradient(top, #646464 0%, #4a4a4a 50%, #3b3b3b 51%, #525252 100%);
background: linear-gradient(to bottom, #646464 0%, #4a4a4a 50%, #3b3b3b 51%, #525252 100%);
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#8a8a8a', endColorstr='#787878', GradientType=0);
filter: none;
}
#nav ul li ul {
display: none;
}
#nav > ul > li:hover ul {
display: block;
position: absolute;
}
#nav > ul > li:first-child a{
border-left: 1px solid #5d5d5d;
}
http://jsfiddle.net/isherwood/DMR6k/3
#nav ul {
display: table;
margin: 0 auto;
padding-left: 0;
}
#nav ul li {
display: table-cell;
}
It's one of those days and I can not figure out why I'm getting a space to the left of each of the LI tags in the following code. If you hover over, the menu items you'll see what I mean.
http://jsfiddle.net/midnitesonnet/C2Dub/
<div id="wrapper">
<div id="menu">
<ul>
<li>Home</li>
<li>Home</li>
<li>Home</li>
</ul>
</div>
<div id="content">Content</div>
<div id="footer">Footer</div>
</div>
I can not figure out why I'm getting a space to the left of each of the LI tags
Because you format them with display:inline-block - and have whitespace between the tags. That's basic "HTML behavior", that any whitespace between two inline(-block) elements is condensed to one space character when displayed.
Either float the LI instead, or write them without whitespace between the tags, meaning ...</li><li>...
try this
http://jsfiddle.net/C2Dub/4/
/* CSS Document */
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 0.9em;
margin-top: 0px;
background-color: #f5f5f5;
}
#wrapper {
background-color: #ffffff;
width: 1000px;
margin: auto;
-webkit-box-shadow: 0px 0px 6px rgba(50, 50, 50, 0.64);
-moz-box-shadow: 0px 0px 6px rgba(50, 50, 50, 0.64);
box-shadow: 0px 0px 6px rgba(50, 50, 50, 0.64);
/*-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;*/
}
#menu {
background: #505050;
background: -moz-linear-gradient(top, #505050 0%, #343434 50%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#505050), color-stop(50%,#343434));
background: -webkit-linear-gradient(top, #505050 0%,#343434 50%);
background: -o-linear-gradient(top, #505050 0%,#343434 50%);
background: -ms-linear-gradient(top, #505050 0%,#343434 50%);
background: linear-gradient(to bottom, #505050 0%,#343434 50%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#505050', endColorstr='#343434',GradientType=0 );
min-height: 26px;
color: #CCC;
}
#menu ul {
display: block;
height: 39px;
list-style: none outside none;
margin: 0;
padding: 0;
}
#menu li {
margin: 0;
display: inline-block;
height: 39px;
border-right: 1px solid rgb(0, 0, 0);
padding: 0px 20px !important;
line-height: 39px;
list-style: none;
float:left;
}
#menu li a {
display: inline-block;
width: 99%;
color: #CCC;
text-decoration: none;
}
#menu li:hover {
background: #6b6b6b;
background: -moz-linear-gradient(top, #6b6b6b 0%, #4c4c4c 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6b6b6b), color-stop(100%,#4c4c4c));
background: -webkit-linear-gradient(top, #6b6b6b 0%,#4c4c4c 100%);
background: -o-linear-gradient(top, #6b6b6b 0%,#4c4c4c 100%);
background: -ms-linear-gradient(top, #6b6b6b 0%,#4c4c4c 100%);
background: linear-gradient(to bottom, #6b6b6b 0%,#4c4c4c 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6b6b6b', endColorstr='#4c4c4c',GradientType=0 );
}
#content {
min-height: 600px;
padding: 5px;
}
#footer {
min-height: 50px;
background: #f4f7f5;
background: -moz-linear-gradient(top, #f4f7f5 0%, #edf5f7 37%, #d3e8e6 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f4f7f5), color-stop(37%,#edf5f7), color-stop(100%,#d3e8e6));
background: -webkit-linear-gradient(top, #f4f7f5 0%,#edf5f7 37%,#d3e8e6 100%);
background: -o-linear-gradient(top, #f4f7f5 0%,#edf5f7 37%,#d3e8e6 100%);
background: -ms-linear-gradient(top, #f4f7f5 0%,#edf5f7 37%,#d3e8e6 100%);
background: linear-gradient(to bottom, #f4f7f5 0%,#edf5f7 37%,#d3e8e6 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f7f5', endColorstr='#d3e8e6',GradientType=0 );
border-top: 1px #D2D2D2 solid;
}
This seems to work, I floated your li's, removed some padding and changed the height of the menu: http://jsfiddle.net/C2Dub/5/
#menu {
background: #505050;
background: -moz-linear-gradient(top, #505050 0%, #343434 50%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#505050), color-stop(50%,#343434));
background: -webkit-linear-gradient(top, #505050 0%,#343434 50%);
background: -o-linear-gradient(top, #505050 0%,#343434 50%);
background: -ms-linear-gradient(top, #505050 0%,#343434 50%);
background: linear-gradient(to bottom, #505050 0%,#343434 50%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#505050', endColorstr='#343434',GradientType=0 );
min-height: 39px;
color: #CCC;
}
#menu ul {
display: block;
padding: 0;
margin: 0;
list-style: none;
}
#menu li {
margin: 0;
float: left;
height: 19px;
border-right: 1px solid rgb(0, 0, 0);
padding: 10px 20px !important;
list-style: none;
}
U have some whitespace characters between your HTML code try to put the li tags on eachtoher:
<ul>
<li>Home</li>
<li>Home</li>
<li>Home</li>
</ul>
This solved the problem in the Fiddle.