variable width li tabs - html

How can i force the css to make the li tabs i have fill its section. The number of tabs can change to either 4 or 5.
I have tried adding the follow:
.tabs ul li {
display:table-cell;
}
.tabs ul.static
{
display:table !important;
width:750px !important;
table-layout:fixed !important;
}
But it has not worked. When there is a 5th tab the 5th goes to the line below. The current jsfiddle below does this.
How can i get the tabs to cover 100% of the width of its container whether there are 4 or 5 tabs?
http://jsfiddle.net/L7osd1oc/3/

your ul width 750px fix.
so you can add li fix width in % and remove ul left panding

Follow the table structure when you style the elements like below
.tabs{
display:table;
}
.tabs ul.static{
display:table-row;
}
.tabs ul li{
display:table-cell;
}
When you specifying width, in your case 750px, assign this to .tabs which is the table element.
See if this helps you.

try this demo
.tabs {
position: relative;
top: 1px;
z-index: 2;
display: block;
margin: 0 auto 0 auto;
}
.tabs a.static.selected {
width:100%;
padding:10px 0 10px 0;
background: #4096ee; /* Old browsers */
background: -moz-linear-gradient(top, #4096ee 0%, #88bff7 55%, #93c9ff 99%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4096ee), color-stop(55%,#88bff7), color-stop(99%,#93c9ff)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #4096ee 0%,#88bff7 55%,#93c9ff 99%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #4096ee 0%,#88bff7 55%,#93c9ff 99%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #4096ee 0%,#88bff7 55%,#93c9ff 99%); /* IE10+ */
background: linear-gradient(to bottom, #4096ee 0%,#88bff7 55%,#93c9ff 99%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4096ee', endColorstr='#93c9ff',GradientType=0 ); /* IE6-9 */
}
.tabs a.static {
color:#000000 !important;
float:none;
text-decoration:none;
}
.tabs ul li {
list-style: none;
margin-left: 1px;
color: #000000;
margin:0px;
padding:0px;
text-align:center;
background: #93c9ff; /* Old browsers */
background: -moz-linear-gradient(top, #93c9ff 1%, #88bff7 45%, #4096ee 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#93c9ff), color-stop(45%,#88bff7), color-stop(100%,#4096ee)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #93c9ff 1%,#88bff7 45%,#4096ee 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #93c9ff 1%,#88bff7 45%,#4096ee 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #93c9ff 1%,#88bff7 45%,#4096ee 100%); /* IE10+ */
background: linear-gradient(to bottom, #93c9ff 1%,#88bff7 45%,#4096ee 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#93c9ff', endColorstr='#4096ee',GradientType=0 ); /* IE6-9 */
display:inline-block ;
}
.tabs a:link {
color: #000000;
text-decoration:none;
}
.tab {
padding: 10px 15px;
position: relative;
display: inline-block;
list-style: none;
text-align:center;
}
.tabs.static.selected:after {
list-style: none;
padding: 10px 15px;
position: relative;
display: inline-block;
}
.tabs ul.static
{
padding:0px;
background: #93c9ff; /* Old browsers */
background: -moz-linear-gradient(top, #93c9ff 1%, #88bff7 45%, #4096ee 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#93c9ff), color-stop(45%,#88bff7), color-stop(100%,#4096ee)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #93c9ff 1%,#88bff7 45%,#4096ee 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #93c9ff 1%,#88bff7 45%,#4096ee 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #93c9ff 1%,#88bff7 45%,#4096ee 100%); /* IE10+ */
background: linear-gradient(to bottom, #93c9ff 1%,#88bff7 45%,#4096ee 100%); /* W3C */
display:table !important;
width:750px !important;
table-layout:fixed !important;
width:100%;
text-align:center;
}
.tab-content {
width:730px;
margin: auto;
background: #fff;
min-height: 200px;
border-radius: 7px;
padding:10px;
text-align:center;
}
.changeButton {
padding: 10px;
margin-left: 25px;
color: #FFFFFF;
background-image: url('data:image/png;base64,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') !important;
background-repeat: repeat-x;
border-style:none;
}
.in-life-container
{
display: block;
margin: auto;
width:750px ;
}
<div class="in-life-container"> <img alt="Skip Navigation Links" src="/WebResource.axd?d=6iNAiGgDBpuUye_ZuQPbwXiF72lVuKy1N2-6JtQmWhRUTLP-_aBCSi-HAD2Zs-eHQCBbOkoJeU_cbrTEvN9ZQUSgy7q8g4vdB9ibfUBW5rM1&t=635418570520000000" width="0" height="0" style="border-width:0px;">
<div class="tabs" id="ContentPlaceHolder_Body_Settings_Repeater_AccountSettings_ctl00_1_Menu_MyVoiceTabMenu_1" style="float: left;">
<ul class="level1 static" tabindex="0" role="menubar" style="position: relative;"><li role="menuitem" class="static" style="position: relative; "><a class="level1 tab static" href="#" onclick="__doPostBack('ctl00$ContentPlaceHolder_Body$Settings$Repeater_AccountSettings$ctl01$ctl00$Menu_MyVoiceTabMenu','4')" tabindex="-1">SIP Details</a></li>
<li role="menuitem" class="static" style="position: relative;"><a class="level1 tab selected static" href="#" onclick="__doPostBack('ctl00$ContentPlaceHolder_Body$Settings$Repeater_AccountSettings$ctl01$ctl00$Menu_MyVoiceTabMenu','0')" tabindex="-1">Change Address</a>
</li>
<li role="menuitem" class="static" style="position: relative;"><a class="level1 tab static highlighted" href="#" onclick="__doPostBack('ctl00$ContentPlaceHolder_Body$Settings$Repeater_AccountSettings$ctl01$ctl00$Menu_MyVoiceTabMenu','1')" tabindex="-1">Change Ownership</a>
</li>
<li role="menuitem" class="static" style="position: relative;"><a class="level1 tab static" href="#" onclick="__doPostBack('ctl00$ContentPlaceHolder_Body$Settings$Repeater_AccountSettings$ctl01$ctl00$Menu_MyVoiceTabMenu','2')" tabindex="-1">Re-grade Service</a>
</li>
<li role="menuitem" class="static" style="position: relative;"><a class="level1 tab static" href="#" onclick="__doPostBack('ctl00$ContentPlaceHolder_Body$Settings$Repeater_AccountSettings$ctl01$ctl00$Menu_MyVoiceTabMenu','3')" tabindex="-1">Cease Service</a>
</li>
</ul>
</div>
<div style="clear: left;"></div><a id="ContentPlaceHolder_Body_Settings_Repeater_AccountSettings_ctl00_1_Menu_MyVoiceTabMenu_1_SkipLink"></a>
<div class="tab-content">To change the address on this account please <a id="ContentPlaceHolder_Body_Settings_Repeater_AccountSettings_ctl00_1_LinkButton_CreateTicket_1" href="javascript:__doPostBack('ctl00$ContentPlaceHolder_Body$Settings$Repeater_AccountSettings$ctl01$ctl00$LinkButton_CreateTicket','')">create a ticket here.</a>
</div>
</div>

Related

Flexbox child align-self: flex-end issue in Safari

I'm having some trouble with a flexbox layout in Safari. I have a barchart, aligned using flexbox, but I can't implement it correctly in safari.
Please take a look on my JSfiddle. All advice is welcome! All browsers display it correct, except for Safari.
Fiddle: http://jsfiddle.net/husky999/dq0ha3d5/11/
HTML
<div id="barChart">
<ul class="bars">
<li class="axis">
<div class="level">Ninja</div>
<div class="level">Skilled</div>
<div class="level">Average</div>
<div class="level">Noob</div>
</li>
<li id="tomato" class="eachBar">
<div class="percentage">90<small>%</small>
<div class="skill">HTML5</div></div>
</li>
<li id="pink" class="eachBar">
<div class="percentage">70<small>%</small>
<div class="skill">SASS</div>
</div>
</li>
<li id="yellow" class="eachBar">
<div class="percentage">50<small>%</small>
<div class="skill">JS</div>
</div>
</li>
<li id="aqua" class="eachBar">
<div class="percentage">60<small>%</small>
<div class="skill">JQUERY</div>
</div>
</li>
<li id="apple" class="eachBar">
<div class="percentage">40<small>%</small>
<div class="skill">SYMFONY</div>
</div>
</li>
<li id="khaki" class="eachBar">
<div class="percentage">55<small>%</small>
<div class="skill">OOP</div>
</div>
</li>
</ul>
</div>
CSS
#barChart {
height: 450px;
position: relative;
width: 100%;
background: url(http://2cweb.vn/img/editor-upload/blog/Bo-suu-tap-mau-pattern-cho-thiet-ke-web-P1-2Cwebvn-03.jpg) repeat;
border-bottom: 1px solid #ccc;
}
.bars {
list-style: none;
display: inline;
height: 450px;
display:-webkit-box;
display:-webkit-flex;
display:-webkit-flexbox;
display:flex;
}
.level {
margin: 0 20px 100px 0;
}
.percentage {
position: absolute;
left:0;
right:0;
margin-left:auto;
margin-right:auto;
bottom: 0;
font-family: arial;
font-size: 32pt;
color: #FFF;
opacity: 0.3;
text-align: center;
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.3);
}
.skill {
text-align: center;
color: #fff;
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.3);
font-family: arial;
font-size: 12px;
}
small {
font-size: 14pt;
vertical-align: middle;
}
.eachBar {
position: relative;
width: 15%;
float: left;
margin-left:20px;
visibility: hidden;
display: inline-block;
align-self: flex-end;
opacity: 0;
-webkit-border-radius: 0.3em 0.3em 0 0;
-moz-box-shadow: inset 0 0 1px 0 #FFF;
-webkit-box-shadow: inset 0 0 1px 0 #FFF;
box-shadow: inset 0 0 1px 0 #FFF;
}
.axis {
display: block;
float: left;
border-right: 1px solid #CCC;
}
#tomato {
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ff3019+0,cf0404+100;Red+3D */
background: rgb(255,48,25); /* Old browsers */
background: -moz-linear-gradient(top, rgba(255,48,25,1) 0%, rgba(207,4,4,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,48,25,1)), color-stop(100%,rgba(207,4,4,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,48,25,1) 0%,rgba(207,4,4,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,48,25,1) 0%,rgba(207,4,4,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(255,48,25,1) 0%,rgba(207,4,4,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(255,48,25,1) 0%,rgba(207,4,4,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff3019', endColorstr='#cf0404',GradientType=0 ); /* IE6-9 */
border: 1px solid rgba(207,4,4,1);
}
#pink {
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#fb83fa+0,e93cec+100;Pink+3D+%232 */
background: rgb(251,131,250); /* Old browsers */
background: -moz-linear-gradient(top, rgba(251,131,250,1) 0%, rgba(233,60,236,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(251,131,250,1)), color-stop(100%,rgba(233,60,236,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(251,131,250,1) 0%,rgba(233,60,236,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(251,131,250,1) 0%,rgba(233,60,236,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(251,131,250,1) 0%,rgba(233,60,236,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(251,131,250,1) 0%,rgba(233,60,236,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fb83fa', endColorstr='#e93cec',GradientType=0 ); /* IE6-9 */
border: 1px solid rgba(233,60,236,1);
}
#yellow {
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#f1e767+0,feb645+100;Yellow+3D */
background: rgb(241,231,103); /* Old browsers */
background: -moz-linear-gradient(top, rgba(241,231,103,1) 0%, rgba(254,182,69,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(241,231,103,1)), color-stop(100%,rgba(254,182,69,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(241,231,103,1) 0%,rgba(254,182,69,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(241,231,103,1) 0%,rgba(254,182,69,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(241,231,103,1) 0%,rgba(254,182,69,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(241,231,103,1) 0%,rgba(254,182,69,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1e767', endColorstr='#feb645',GradientType=0 ); /* IE6-9 */
border: 1px solid rgba(254,182,69,1);
}
#aqua {
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#93cede+0,75bdd1+41,49a5bf+100;Blue+3D+%235 */
background: rgb(147,206,222); /* Old browsers */
background: -moz-linear-gradient(top, rgba(147,206,222,1) 0%, rgba(117,189,209,1) 41%, rgba(73,165,191,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(147,206,222,1)), color-stop(41%,rgba(117,189,209,1)), color-stop(100%,rgba(73,165,191,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(147,206,222,1) 0%,rgba(117,189,209,1) 41%,rgba(73,165,191,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(147,206,222,1) 0%,rgba(117,189,209,1) 41%,rgba(73,165,191,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(147,206,222,1) 0%,rgba(117,189,209,1) 41%,rgba(73,165,191,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(147,206,222,1) 0%,rgba(117,189,209,1) 41%,rgba(73,165,191,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#93cede', endColorstr='#49a5bf',GradientType=0 ); /* IE6-9 */
border: 1px solid rgba(73,165,191,1);
}
#apple {
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#d2ff52+0,91e842+100;Neon */
background: rgb(210,255,82); /* Old browsers */
background: -moz-linear-gradient(top, rgba(210,255,82,1) 0%, rgba(145,232,66,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(210,255,82,1)), color-stop(100%,rgba(145,232,66,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(210,255,82,1) 0%,rgba(145,232,66,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(210,255,82,1) 0%,rgba(145,232,66,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(210,255,82,1) 0%,rgba(145,232,66,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(210,255,82,1) 0%,rgba(145,232,66,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d2ff52', endColorstr='#91e842',GradientType=0 ); /* IE6-9 */
border: 1px solid rgba(183,223,45,1);
}
#khaki {
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#d5cea6+0,c9c190+40,b7ad70+100;Brown+3D */
background: rgb(213,206,166); /* Old browsers */
background: -moz-linear-gradient(top, rgba(213,206,166,1) 0%, rgba(201,193,144,1) 40%, rgba(183,173,112,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(213,206,166,1)), color-stop(40%,rgba(201,193,144,1)), color-stop(100%,rgba(183,173,112,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(213,206,166,1) 0%,rgba(201,193,144,1) 40%,rgba(183,173,112,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(213,206,166,1) 0%,rgba(201,193,144,1) 40%,rgba(183,173,112,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(213,206,166,1) 0%,rgba(201,193,144,1) 40%,rgba(183,173,112,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(213,206,166,1) 0%,rgba(201,193,144,1) 40%,rgba(183,173,112,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d5cea6', endColorstr='#b7ad70',GradientType=0 ); /* IE6-9 */
border: 1px solid rgba(183,173,112,1);
}
Javascript
$(document).ready(function() {
$('#tomato').css({'visibility':'visible', 'height': '0%'}).animate({'opacity':'1', 'height':'90%'}, 1000, 'easeOutExpo');
$('#pink').css({'visibility':'visible', 'height': '0%'}).stop().delay(200).animate({'opacity':'1', 'height':'70%'}, 1000, 'easeOutExpo');
$('#yellow').css({'visibility':'visible', 'height': '0%'}).stop().delay(400).animate({'opacity':'1', 'height':'50%'}, 1000, 'easeOutExpo');
$('#aqua').css({'visibility':'visible', 'height': '0%'}).stop().delay(600).animate({'opacity':'1', 'height':'60%'}, 1000, 'easeOutExpo');
$('#apple').css({'visibility':'visible', 'height': '0%'}).stop().delay(800).animate({'opacity':'1', 'height':'40%'}, 1000, 'easeOutExpo');
$('#khaki').css({'visibility':'visible', 'height': '0%'}).stop().delay(1000).animate({'opacity':'1', 'height':'55%'}, 1000, 'easeOutExpo');
});
Thanks, and have nice day/night!
Looks like you included Safari prefixes for the flex container...
.bars {
list-style: none;
display: inline;
height: 450px;
display:-webkit-box;
display:-webkit-flex;
display:-webkit-flexbox;
display:flex;
}
... but you didn't for the flex items (the bars).
Make this adjustment to your CSS:
.eachBar {
position: relative;
width: 15%;
float: left;
margin-left:20px;
visibility: hidden;
display: inline-block;
-webkit-align-self: flex-end; /* add prefixed version */
-ms-flex-item-align: end; /* add prefixed version */
align-self: flex-end;
opacity: 0;
-webkit-border-radius: 0.3em 0.3em 0 0;
-moz-box-shadow: inset 0 0 1px 0 #FFF;
-webkit-box-shadow: inset 0 0 1px 0 #FFF;
box-shadow: inset 0 0 1px 0 #FFF;
}
Revised Demo
Although Safari 9 supports all standard flex properties, with Safari 8 and older you'll need to use vendor prefixes.
For a quick way to add all the prefixes you need, post your CSS in the left panel here: Autoprefixer.
For flexbox browser support details see here: http://caniuse.com/#search=flexbox

CSS - positioning navigation title

I was wondering how can I position navigation titles so that my dropdown menu would work..
The following picture is my perfectly positioned a links, separated thanks to padding-left, which is set to 80 px; Strangely enough, my dropdown category is padded as well, leaving extra space, which makes it very ugly to look. And my dropdown menu link is separated in two lines, although it is only one link. How can I fix this problem? I tried with margin as well, nothing really changed. I would like it to be something like this the third picture..
Picture one - My desired navigation positioning :
http://i61.tinypic.com/2cshw7q.png
Picture two - My dropdown problem :
http://i60.tinypic.com/2z4037c.png
Picture three - The way I would like it to be:
http://i60.tinypic.com/1252ejo.png
How can I accomplish this?
EDIT!
My CSS code:
#menu
{
clear:both;
position: relative;
width: 100%;
height:30px;
background: rgb(38,42,53); /* Old browsers */
background: -moz-linear-gradient(top, rgba(38,42,53,1) 0%, rgba(40,45,63,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(38,42,53,1)), color-stop(100%,rgba(40,45,63,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(38,42,53,1) 0%,rgba(40,45,63,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(38,42,53,1) 0%,rgba(40,45,63,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(38,42,53,1) 0%,rgba(40,45,63,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(38,42,53,1) 0%,rgba(40,45,63,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#262a35', endColorstr='#282d3f',GradientType=0 ); /* IE6-9 */
}
ul#menu {
margin:0;
padding:0;
list-style-type: none;
text-transform: uppercase;
font-size: 15px;
}
ul#menu li{
position: relative;
display:inline-block;
/*float:left;*/
margin:0;
padding:0;
}
ul#menu li a{
display:block;
float:left;
color:#84FD00; /* #874B46 */
text-decoration:none;
padding-left: 80px;
padding-top: 5px;
}
ul#menu li ul {
margin-top:20px;
position: absolute;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow:none;
opacity: 0;
visibility: 0;
padding-left: 30px;
}
ul#menu li ul li {
background: rgb(38,42,53); /* Old browsers */
background: -moz-linear-gradient(top, rgba(38,42,53,1) 0%, rgba(40,45,63,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(38,42,53,1)), color-stop(100%,rgba(40,45,63,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(38,42,53,1) 0%,rgba(40,45,63,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(38,42,53,1) 0%,rgba(40,45,63,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(38,42,53,1) 0%,rgba(40,45,63,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(38,42,53,1) 0%,rgba(40,45,63,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#262a35', endColorstr='#282d3f',GradientType=0 ); /* IE6-9 */
color: #8BA8C5;
height: 40px;
}
ul#menu li ul li:hover {
background: #666;
}
ul#menu li:hover ul {
display: block;
opacity: 1;
visibility: visible;
margin-right:20px;
}
Set the dropdown ul to have text-align: left; - this should show the text on the left hand side. For some reason your text is right aligned...

LI height same as UL

Hi I am wondering how come my UL is 38px height yet the LI does not fit 100% height.
ul#ordermenu{
height:38px !important;
width:100% !important;
line-height:38px;
}
ul#ordermenu li
{
height:38px !important;
display: inline;
list-style-type: none;
padding-right: 100px;
color:#000;
line-height:38px;
font-size:20px;
}
ul#ordermenu li:last-child {
padding-right:-100px;
}
ul#ordermenu li.active
{
height:38px !important;
line-height:38px;
background: #e6f0a3; /* Old browsers */
background: -moz-linear-gradient(top, #e6f0a3 0%, #d2e638 50%, #c3d825 51%, #dbf043 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e6f0a3), color-stop(50%,#d2e638), color-stop(51%,#c3d825), color-stop(100%,#dbf043)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #e6f0a3 0%,#d2e638 50%,#c3d825 51%,#dbf043 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #e6f0a3 0%,#d2e638 50%,#c3d825 51%,#dbf043 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #e6f0a3 0%,#d2e638 50%,#c3d825 51%,#dbf043 100%); /* IE10+ */
background: linear-gradient(to bottom, #e6f0a3 0%,#d2e638 50%,#c3d825 51%,#dbf043 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e6f0a3', endColorstr='#dbf043',GradientType=0 ); /* IE6-9 */
}
My HTML code
<ul id="ordermenu">
<li class="active">Items</li>
<li>Checkout Status</li>
<li>Postage Details</li>
</ul>
The reason the li is not 38px tall is because of the display: inline on ul#ordermenu li
Try this:
#ordermenu li {
display: inline-block;
height: 38px;
}
You cannot assign a height to inline elements, as you are doing for ul#ordermenu li. Try changing the display property to 'inline-block'. This will allow you to give the list-items a specific height while still arranging them horizontally.

CSS div not working

My Footer div doesn't show the background color..
Here is the style.css file in which all of the background is working except the footer..
[ Style.css]
.Footer {
width: 200px;
border: 1px solid blue;
padding: 5px;
font-weight: bold;
color: #ffffff;
background-color: #000000;
}
body {
background: #b3dced; /* Old browsers */
background: -moz-linear-gradient(top, #b3dced 0%, #29b8e5 50%, #bce0ee 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b3dced), color-stop(50%,#29b8e5), color-stop(100%,#bce0ee)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b3dced 0%,#29b8e5 50%,#bce0ee 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b3dced 0%,#29b8e5 50%,#bce0ee 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #b3dced 0%,#29b8e5 50%,#bce0ee 100%); /* IE10+ */
background: linear-gradient(to bottom, #b3dced 0%,#29b8e5 50%,#bce0ee 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3dced', endColorstr='#bce0ee',GradientType=0 ); /* IE6-9 */
}
.body {
padding-top: 1px;
margin-top: 2px;
width: 1200px;
height: 500px;
}
.about_this_site__title {
width: 200px;
border: 1px solid blue;
padding: 5px;
font-weight: bold;
color: #ffffff;
}
.logo {
margin-top: 10px;
margin-right: 500px;
}
#menu {
padding: 0;
margin: 0;
width: 1000px;
margin-right: auto;
margin-left: auto;
border-radius: 2px;
}
#menu ul {
margin: 0;
padding: 0;
border-radius: 3px;
}
#menu ul li {
background: #ffffff;
float: left;
position: relative;
border-radius: 2px;
list-style-type: none;
}
#menu ul li a {
font-family: Verdana;
font-size: 14px;
color: blue;
text-decoration: none;
display: block;
line-height: 30px;
width: 160px;
height: 30px;
text-align: center;
}
#menu ul ul {
position: absolute;
visibility: hidden;
top: 31px;
}
#menu ul li ul li a:hover {
color: white;
background: #b8e1fc; /* Old browsers */
background: -moz-linear-gradient(top, #b8e1fc 0%, #a9d2f3 10%, #90bae4 25%, #90bcea 37%, #90bff0 50%, #6ba8e5 51%, #a2daf5 83%, #bdf3fd 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b8e1fc), color-stop(10%,#a9d2f3), color-stop(25%,#90bae4), color-stop(37%,#90bcea), color-stop(50%,#90bff0), color-stop(51%,#6ba8e5), color-stop(83%,#a2daf5), color-stop(100%,#bdf3fd)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b8e1fc 0%,#a9d2f3 10%,#90bae4 25%,#90bcea 37%,#90bff0 50%,#6ba8e5 51%,#a2daf5 83%,#bdf3fd 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b8e1fc 0%,#a9d2f3 10%,#90bae4 25%,#90bcea 37%,#90bff0 50%,#6ba8e5 51%,#a2daf5 83%,#bdf3fd 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #b8e1fc 0%,#a9d2f3 10%,#90bae4 25%,#90bcea 37%,#90bff0 50%,#6ba8e5 51%,#a2daf5 83%,#bdf3fd 100%); /* IE10+ */
background: linear-gradient(to bottom, #b8e1fc 0%,#a9d2f3 10%,#90bae4 25%,#90bcea 37%,#90bff0 50%,#6ba8e5 51%,#a2daf5 83%,#bdf3fd 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b8e1fc', endColorstr='#bdf3fd',GradientType=0 ); /* IE6-9 */
}
#menu ul li:hover ul {
visibility: visible;
font-weight: bold;
}
#menu ul li:hover {
background: #87e0fd; /* Old browsers */
background: -moz-linear-gradient(top, #87e0fd 0%, #53cbf1 40%, #05abe0 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#87e0fd), color-stop(40%,#53cbf1), color-stop(100%,#05abe0)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* IE10+ */
background: linear-gradient(to bottom, #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#87e0fd', endColorstr='#05abe0',GradientType=0 ); /* IE6-9 */
}
The text shows up but the background doesnt.
[ index.html ]
<div class="Footer">Copyright bla blah</div>
You are opening a p tag and closing with a div tag.
<p class="Footer">Copyright bla blah</p>
Also you have not defined a background color.
Use background-color instead of colorfor it in the css.
Replace
color: #ffffff;
with
background-color: #ffffff;
Sorry i am going to rip your question apart, because someone has to.
Firstly, you are opening with a <p> tag and closing with a </div> tag. This is your first mistake. Secondly, you have not declared a background-color variable at all in the CSS provided. Thirdly, you should never use a <p> tag for ANY BLOCK elements on your page. Always use a <div></div> for your block elements. It is just good practice and valid HTML coding.
In saying that, your code should look something like the following:
[ Style.css]
.Footer {
width: 200px;
border: 1px solid blue;
padding: 5px;
font-weight: bold;
color: #ffffff;
background-color: red;
}
[ index.html ]
<div class="Footer"><p>Copyright bla blah</p></div>
(the <p></p> tag above is purely up to you to have or not as it does allow for more flexibility in your design but not necessary to have.
Hope this helps for future endeavors.

Positioning dropdown menu in IE and Firefox

I'm trying to position this dropdown menu. It only works in Chrome, the submenu appear right below the hovered link. But in IE and firefox they all appear at the same place in the bottom left.
http://jsfiddle.net/3HZGB/2/
CSS
#menu {
float:right;
list-style-type: none;
padding: 0px;
margin: 36px 130px 0 0;
}
#menu a {
height:50px;
font-size:18px;
font-weight:bold;
color:black;
text-decoration:none;
}
#menu a:hover {
color:#FFF;
border:#002d56 6px solid;
background-color:#002d56;
opacity:0.8;
}
#menu li {
position:relative;
display:inline;
padding:24px 5px 10px 5px;
margin-left:40px;
}
#menu li:hover > ul
{
display: block;
}
#menu li:hover ul {
display: block;
}
#menu ul li:first-child a:after /*triangulo*/
{
content: '';
position: absolute;
left: 10px;
top: -15px;
z-index:99999;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 8px solid #002d56;
}
/*submenu*/
#menu ul {
padding:5px 30px 5px 10px;
margin-top:12px;
position:absolute;
display:none;
z-index: 99999;
float:left;
/*visual*/
background-color:#002d56;
box-shadow: 4px 4px 10px #999;
border:#002d56 2px solid;
/*opacity:0.9;*/
border-radius:10px;
/*gradiente*/
background-image: linear-gradient(bottom, rgb(0,72,135) 39%, rgb(0,43,84) 66%);
background-image: -o-linear-gradient(bottom, rgb(0,72,135) 39%, rgb(0,43,84) 66%);
background-image: -moz-linear-gradient(bottom, rgb(0,72,135) 39%, rgb(0,43,84) 66%);
background-image: -webkit-linear-gradient(bottom, rgb(0,72,135) 39%, rgb(0,43,84) 66%);
background-image: -ms-linear-gradient(bottom, rgb(0,72,135) 39%, rgb(0,43,84) 66%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.39, rgb(0,72,135)),
color-stop(0.66, rgb(0,43,84))
);
}
#menu ul a
{
color:#FFF;
font-size:14px;
font-weight:400;
padding: 10px;
height: auto;
line-height: 1;
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}
#menu ul a:hover {
background-color:transparent;
border:none;
display: block;
font-size:14px;
font-weight:400;
text-decoration:underline;
opacity:1;
}
#menu ul li
{
float: none;
margin: 0;
padding: 0;
display: block;
}
.form
{
color:#FFF;
font-size:14px;
font-weight:400;
padding: 10px;
height: auto;
line-height: 1;
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}
.form li:first-child/*triangulo*/
{
content: '';
position: absolute;
left: 10px;
top: -15px;
z-index:99999;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 8px solid #002d56;
}
.forminput {
margin:8px 0;
width:100px;
border:2px solid #919293;
border-radius:10px;
padding:5px;
/*gradiente*/
background: rgb(255,255,255); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjcwJSIgc3RvcC1jb2xvcj0iI2Q2ZDZkNiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9Ijg5JSIgc3RvcC1jb2xvcj0iI2JjYmNiYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhM2EzYTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(214,214,214,1) 70%, rgba(188,188,188,1) 89%, rgba(163,163,163,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(70%,rgba(214,214,214,1)), color-stop(89%,rgba(188,188,188,1)), color-stop(100%,rgba(163,163,163,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(214,214,214,1) 70%,rgba(188,188,188,1) 89%,rgba(163,163,163,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(214,214,214,1) 70%,rgba(188,188,188,1) 89%,rgba(163,163,163,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(214,214,214,1) 70%,rgba(188,188,188,1) 89%,rgba(163,163,163,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(255,255,255,1) 0%,rgba(214,214,214,1) 70%,rgba(188,188,188,1) 89%,rgba(163,163,163,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#a3a3a3',GradientType=0 ); /* IE6-8 */
}
*:focus { outline:none; }
.enviar {
float:right;
width:50px;
color:#fff;
border:2px solid #002d56;
border-radius:10px;
padding:5px;
/*gradients*/
background: rgb(30,87,153); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzFlNTc5OSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzI5ODlkOCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUxJSIgc3RvcC1jb2xvcj0iIzIwN2NjYSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
background: -moz-linear-gradient(top, rgba(30,87,153,1) 0%, rgba(41,137,216,1) 50%, rgba(32,124,202,1) 51%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(30,87,153,1)), color-stop(50%,rgba(41,137,216,1)), color-stop(51%,rgba(32,124,202,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%); /* IE10+ */
background: linear-gradient(top, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#207cca',GradientType=0 ); /* IE6-8 */
}
.login {
margin:0 10px 0 0;
}
.perdadesenha a {
font-size:9px;
}
/**/
HTML
<ul id="menu">
<li>EMPRESA
<ul><li>Visão geral</li>
<li>História</li>
<li>Escritórios</li>
<li>Trabalhe conosco</li>
</ul>
</li>
<li>SERVIÇOS
<ul>
<li>Despacho</li>
<li>Transporte Rodoviário</li>
<li>Logística de Líquidos</li>
<li>Frete Internacional</li>
<li>Licenças Polícia/Exército</li>
</ul>
</li>
<li>CONTATO</li>
<li>LOGIN
<ul class="form"><form>
<li></li>
<li><label class="login">Login</label><input class="forminput" type="text" name="firstname" /><br />
<label>Senha</label> <input class="forminput" type="password" name="firstname" /></li>
<li><input class="enviar" type="submit" value="Entrar" /></li>
</form>
<font size="-6">Esqueceu a senha?</font>
</ul>
</li>
</ul>
you need to update your css
in "#menu ul " remove the following properties
margin-top:12px;
float:left;
and add
top:56px;
left:0;
here is the updated jsFiddle file.
this will fix drop down issue.