tbody scrolling left to right but not the thead - html

I ned to make the thead scroll left to right when the user scrolls the tbody.
I also need the thead to not show the th that should be hidden if they are not in view.
I tried css overflow but iam not sure if this is the correct way.
Here is the full CSS I use for the table.
I have been stuck on this for over a week now. So thought I would ask
table{
height:300px;
width:980px;
overflow:scroll;
}
#dowithleads, #dowithleads table, thead, #dowithleads tbody{
float:left;
width:980px;
min-height:40px;
margin-top:10px;
-webkit--radius: 8px;
-moz--radius: 8px;
-radius: 8px;
/*background:url("../images/ie/formareabg.png") repeat;*/
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#dddddd));
background: -webkit-linear-gradient(#ffffff, #dddddd);
background: -moz-linear-gradient(#ffffff, #dddddd);
background: -ms-linear-gradient(#ffffff, #dddddd);
background: -o-linear-gradient(#ffffff, #dddddd);
background: linear-gradient(#ffffff, #dddddd);
behavior:url(-radius.htc);
}
tr{
width:100%;
}
td,th{
cellspacing:0;
min-width: 100px;
border-bottom:thin solid #999;
line-height:40px;
min-height:40px;
padding-right:5px;
}
th{
line-height:normal;
}
tbody td{
line-height:30px;
min-height:40px;
margin:0 5px;
}
.bigger, .companysize{
min-width:200px;
max-width:200px;
}
tbody tr{
float:left;
:thin solid #999;
-webkit--radius: 8px;
-moz--radius: 8px;
-radius: 8px;
background:url("../images/manage.body.jpg") repeat;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#dddddd));
background: -webkit-linear-gradient(#ffffff, #dddddd);
background: -moz-linear-gradient(#ffffff, #dddddd);
background: -ms-linear-gradient(#ffffff, #dddddd);
background: -o-linear-gradient(#ffffff, #dddddd);
background: linear-gradient(#ffffff, #dddddd);
behavior:url(-radius.htc);
-bottom:none;
}
thead{
color:#fff;
margin:0;
background:url("../images/manage.black.jpg") repeat;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#666666), to(#333333));
/* Safari 5.1, Chrome 10+ */
background: -webkit-linear-gradient(top, #666666, #333333);
/* Firefox 3.6+ */
background: -moz-linear-gradient(top, #666666, #333333);
/* IE 10 */
background: -ms-linear-gradient(top, #666666, #333333);
/* Opera 11.10+ */
background: -o-linear-gradient(top, #666666, #333333);
}
tbody{
font-size:12px;
margin:0;
background:#fff;
-bottom:thin solid #999;
}
th.small, td.small{
min-width:40px;
width:40px;
max-width:40px;
}
tr.leadone{
color:#000;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#0099FF), to(#006699));
/* Safari 5.1, Chrome 10+ */
background: -webkit-linear-gradient(top, #0099FF, #006699);
/* Firefox 3.6+ */
background: -moz-linear-gradient(top, #0099FF, #00669);
/* IE 10 */
background: -ms-linear-gradient(top, #0099FF, #00669);
/* Opera 11.10+ */
background: -o-linear-gradient(top, #0099FF, #00669);
}
tr.leadred{
color:#000;
background-image: linear-gradient(bottom, rgb(255,81,0) 0%, rgb(255,204,0) 100%);
background-image: -o-linear-gradient(bottom, rgb(255,81,0) 0%, rgb(255,204,0) 100%);
background-image: -moz-linear-gradient(bottom, rgb(255,81,0) 0%, rgb(255,204,0) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(255,81,0) 0%, rgb(255,204,0) 100%);
background-image: -ms-linear-gradient(bottom, rgb(255,81,0) 0%, rgb(255,204,0) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(255,81,0)),
color-stop(1, rgb(255,204,0))
);
}
.last{
:none;
}
.page-number, .view-all{
color:#fff;
-webkit--radius: 8px;
-moz--radius: 8px-radius: 8px;
background:#000;
margin:3px;
min-width:30px;
min-height:30px;
line-height:30px;
float:left;
background:url("../images/manage.black.jpg") repeat;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#666666), to(#333333));
/* Safari 5.1, Chrome 10+ */
background: -webkit-linear-gradient(top, #666666, #333333);
/* Firefox 3.6+ */
background: -moz-linear-gradient(top, #666666, #333333);
/* IE 10 */
background: -ms-linear-gradient(top, #666666, #333333);
/* Opera 11.10+ */
background: -o-linear-gradient(top, #666666, #333333);
}
#searchbox{
float:right;
width:250px;
text-align:left;
}
#manageleads{
float:left;
width:900px;
}
.ui-state-active{
background:url("../images/manage.active.jpg") repeat;
}
button.manage{
font-size:16px;
width:160px;
float:left;
}
.clickable{
cursor:pointer;
cursor:hand;
margin:0 4px;
}
html>body div.tableContainer {
overflow: hidden;
width: 756px
}
/* define width of table. IE browsers only */
div.tableContainer table {
float: left;
width: 740px
}
/* define width of table. Add 16px to width for scrollbar. */
/* All other non-IE browsers. */
html>body div.tableContainer table {
width: 756px
}
/* set table header to a fixed position. WinIE 6.x only */
/* In WinIE 6.x, any element with a position property set to relative and is a child of */
/* an element that has an overflow property set, the relative value translates into fixed. */
/* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */
thead.fixedHeader tr {
position: relative
}
/* set THEAD element to have block level attributes. All other non-IE browsers */
/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
html>body thead.fixedHeader tr {
display: block
}
/* make the A elements pretty. makes for nice clickable headers */
thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited {
color: #FFF;
display: block;
text-decoration: none;
width: 100%
}
/* make the A elements pretty. makes for nice clickable headers */
/* WARNING: swapping the background on hover may cause problems in WinIE 6.x */
thead.fixedHeader a:hover {
color: #FFF;
display: block;
text-decoration: underline;
width: 100%
}
/* define the table content to be scrollable */
/* set TBODY element to have block level attributes. All other non-IE browsers */
/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
/* induced side effect is that child TDs no longer accept width: auto */
html>body tbody.scrollContent {
display: block;
height: 380px;
overflow: auto;
max-width: 980px;
}
table#manageleads{
width:980px;
height:400px;
overflow:scroll;
}
.ui-datepicker-calendar{
width:300px;
max-width:300px;
}

I answered my own question, to do what I wanted to do I needed to create a DIV overflow box around the table

You have got an interesting problem of yours. However, I believe that it can not be solved only by using CSS.
If I were you I would try to get offset of the body (how much pixels are hidden by the scrooling) by using JavaScript and then make the same offset to head. Try to use dynamic absolute positioning of head's content.
It's just a hint but I have seen something similar done in c# application and it worked.

Related

how to align 2 div inside a div?

I have this JSFiddle: Click here
<div id="header-parent">
<div id=header>
<div id=header-title><img src="${pageContext.request.contextPath}/icon/pizza2.png"><span>this is a title</span></div>
<div id=header-cart><div id="cart-title">
<div><span>0</span></div>
<div><span>pizza cart</span></div>
</div>
<div id="cart-icon"><img src="${pageContext.request.contextPath}/icon/shopping-cart.PNG"></div>
</div>
</div>
</div>
If you go to that page youll see that the right div is actually align under the header itself.
How can I set the right div to be inside the header?
A float always float above the next element. So place the header-cart before the cart-title.
Updated JsFiddle
Obs: I didn't fix the fiddle, there's some serious adjustments you have to make. You didn't quoted the ids, among other things...
http://jsfiddle.net/usnmLuy5/3/
Use display:block-inline to keep the blocks from using 100% width. Use a float on the cart, and set the height of the header so that the cart will fit. spell check height, there is a heigth in the CSS which is being ignored and is not needed.
#header-parent {
padding-top:5px;
padding-bottom:5px;
border-bottom: 1px solid White;
background: #45484d; /* Old browsers */
background: -moz-linear-gradient(top, #45484d 43%, #000000 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(43%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #45484d 43%,#000000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #45484d 43%,#000000 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #45484d 43%,#000000 100%); /* IE10+ */
background: linear-gradient(to bottom, #45484d 43%,#000000 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
}
#header {
position: relative;
margin-left: auto;
margin-right: auto;
cursor: pointer;
height: 36px; /* same as cart */
}
#header-child{
padding:5px 0 5px 0;
display:inline-block;
}
#header-title {
display:inline-block;
}
#header-title img{
width: 25px;
heigth: 25px;
margin-right:5px;
vertical-align: middle;
}
#header-cart{
display: inline-block;
text-align:center;
background-color:red;
float:right;
color:white;
font-size: 15px;
}
#header-cart img{
width: 30px;
heigth: 30px;
}
#header-cart #cart-icon{
float:left;
}
#header-cart #cart-title{
float:left;
}
#header-cart #header-title{
display: inline-block;
background-color:blue;
}
#header-title span{
color: white;
font-family: Georgia, Times, "Times New Roman", serif;
font-size:20px;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}

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...

Button with background gradient and image using html and css

I am trying to get a button with gradient background and an image. This is what I have so far:
jsfiddle/D6xKD/
If you look at the button you can see that the gradient is only working around the image and not throughout the button.
Note: This solution I fetched from other references about a button with gradient background and background image.
My question is: How to get the gradient and image working for cross browsers including ie7 and above?
HTML:
<button class="button" onclick="submit();" type="button">Text button</button>
CSS:
.button{
color: #FFFFFF;
display: inline-block;
font-family:Arial;
font-size: 10px;
font-weight: normal;
padding: 9px 36px 9px 4px;
text-decoration: none;
margin:4px auto auto;
cursor:pointer;
border:0px;
background: #3ba93d;
background-position: 66px 4px;
background-repeat:no-repeat;
background-image: url(http://goo.gl/mw5HWR); /* fallback */
background-image: url(http://goo.gl/mw5HWR), -webkit-gradient(linear, left top, left bottom, from(#3ba93d), to(#27842a)); /* Saf4+, Chrome */
background-image: url(http://goo.gl/mw5HWR), -webkit-linear-gradient(top, #3ba93d, #27842a); /* Chrome 10+, Saf5.1+ */
background-image: url(http://goo.gl/mw5HWR), -moz-linear-gradient(top, #3ba93d, #27842a); /* FF3.6+ */
background-image: url(http://goo.gl/mw5HWR), -ms-linear-gradient(top, #3ba93d, #27842a); /* IE10 */
background-image: url(http://goo.gl/mw5HWR), -o-linear-gradient(top, #3ba93d, #27842a); /* Opera 11.10+ */
background-image: url(http://goo.gl/mw5HWR), linear-gradient(top, #3ba93d, #27842a); /* W3C */
}
Thanks in advance.
could try:
<button class="button" onclick="submit();" type="button">Text button <span></span></button>
<style>
.button{
color: #FFFFFF;
font-family:Arial;
font-size: 10px;
font-weight: normal;
padding: 0;
padding-left: 20px;
height: 36px;
width: 120px;
margin:4px auto auto;
text-align: left;
cursor:pointer;
border:0px;
background: #3ba93d;
background-position: 66px 4px;
background-repeat:no-repeat;
background: #3ba93d; /* fallback */
background: -webkit-gradient(linear, left top, left bottom, from(#3ba93d), to(#27842a)); /* Saf4+, Chrome */
background: -webkit-linear-gradient(top, #3ba93d, #27842a); /* Chrome 10+, Saf5.1+ */
background: -moz-linear-gradient(top, #3ba93d, #27842a); /* FF3.6+ */
background: -ms-linear-gradient(top, #3ba93d, #27842a); /* IE10 */
background: -o-linear-gradient(top, #3ba93d, #27842a); /* Opera 11.10+ */
background: linear-gradient(top, #3ba93d, #27842a); /* W3C */
}
.button span {
position: absolute;
top: 17px;
left: 100px;
width: 20px;
height: 24px;
background: url(http://goo.gl/mw5HWR);
}
</style>
JS Fiddle
Based on #simon-davies answer
you also can ommit the "span" element :
.button{
color: #FFFFFF;
font-family:Arial;
font-size: 10px;
font-weight: normal;
padding: 0;
padding-left: 20px;
height: 36px;
width: 120px;
margin:4px auto auto;
text-align: left;
cursor:pointer;
border:0px;
background: #3ba93d;
background-position: 66px 4px;
background-repeat:no-repeat;
background: #3ba93d; /* fallback */
background: -webkit-gradient(linear, left top, left bottom, from(#3ba93d), to(#27842a)); /* Saf4+, Chrome */
background: -webkit-linear-gradient(top, #3ba93d, #27842a); /* Chrome 10+, Saf5.1+ */
background: -moz-linear-gradient(top, #3ba93d, #27842a); /* FF3.6+ */
background: -ms-linear-gradient(top, #3ba93d, #27842a); /* IE10 */
background: -o-linear-gradient(top, #3ba93d, #27842a); /* Opera 11.10+ */
background: linear-gradient(top, #3ba93d, #27842a); /* W3C */
}
:before {
content : "";
position: absolute;
top: 17px;
left: 100px;
width: 20px;
height: 24px;
background: url(your_image_url) no-repeat;
}
}
This style is pushing the gradient over:
background-position: 66px 4px;
If you remove it, the gradient fills the button.
http://jsfiddle.net/D6xKD/9/
If you need the apple to be in a certain position, I'd recommend expanding the canvas of your image to help in its placement.

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.