Related
I am having an issue with making my text responsive with the image its placed with, specifically in mobile view.
Here is how the module looks in desktop/tablet view:
And here is how it looks in mobile view:
The issue here is that I want the image boxes in mobile view to be center aligned. However, when I centre align the div with the images, the text is still placed on the left side, and not being responsive.
I am not entirely sure how to adjust my code to make the text responsive with the images, but here is the code that I have for these respective elements.
.cssHotelBox {
position: relative;
}
.pickgradient{
position:relative;
display:inline-block;
}
.pickgradient:after {
content:'';
position:absolute;
top:0;
margin-top: 99px;
left: 1px;
width:221px; height:50%;
display:inline-block;
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.70) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.70)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.70) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.70) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.70) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.70) 100%); /* W3C */
}
.cssHotelImage {
height: 160px;
width: 223px;
border: solid 1px #FFF;
margin-top: 40px;
}
.cssHotelText {
color: #FFF;
font-size: 14px !Important;
position: absolute;
top: 160px;
left: 8px;
}
.cssHotelCity {
color: #FFF;
font-family: inherit;
font-size: 11px !Important;
position: absolute;
top:180px;
font-weight: 100 !Important;
display: flex;
align-items: center;
align-content: center;
justify-content: center;
flex-grow: 1;
flex-shrink: 1;
flex-basis: auto;
}
.starRating {
display:inline-block;
width:60px;
height:11px;
background:transparent url(../images/star-sprites.png) no-repeat scroll;
margin-left: 6px;
margin-right: 2px;
}
When I make .cssHotelBox have the text-align: center, this is how it shows up:
I would like the text to be responsive within the image after:
#media (max-width: 768px) {
}
Is there any way I can fix the issue with the text? Thanks.
You should wrap the image and the text within the same container
I'm trying to create a responsive button from a photoshop mockup in HTML and CSS. Here is the button mockup:
I'm struggling with how to get the arrow in the white space and to stay there through different screen sizes.
I created the color separation through a gradient, like this:
HTML
<button> All Team Members </button>
CSS
button {
/* Permalink http://colorzilla.com/gradient-editor/#990033+0,990033+50,990033+86,ffffff+86,ffffff+100 */
width: 70%;
font-size: .6em;
font-size: 3.4vw;
padding: 2%;
color: #ffffff;
outline-color: #990033;
background: rgb(153,0,51); /* Old browsers */
background: -moz-linear-gradient(left, rgba(153,0,51,1) 0%, rgba(153,0,51,1) 50%, rgba(153,0,51,1) 86%, rgba(255,255,255,1) 86%, rgba(255,255,255,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(153,0,51,1)), color-stop(50%,rgba(153,0,51,1)), color-stop(86%,rgba(153,0,51,1)), color-stop(86%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, rgba(153,0,51,1) 0%,rgba(153,0,51,1) 50%,rgba(153,0,51,1) 86%,rgba(255,255,255,1) 86%,rgba(255,255,255,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, rgba(153,0,51,1) 0%,rgba(153,0,51,1) 50%,rgba(153,0,51,1) 86%,rgba(255,255,255,1) 86%,rgba(255,255,255,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, rgba(153,0,51,1) 0%,rgba(153,0,51,1) 50%,rgba(153,0,51,1) 86%,rgba(255,255,255,1) 86%,rgba(255,255,255,1) 100%); /* IE10+ */
background: linear-gradient(to right, rgba(153,0,51,1) 0%,rgba(153,0,51,1) 50%,rgba(153,0,51,1) 86%,rgba(255,255,255,1) 86%,rgba(255,255,255,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#990033', endColorstr='#ffffff',GradientType=1 ); /* IE6-9 */
}
And it currently looks like this:
What is the best way to move forward? I wondered if I should just use screenshots of the button from the mockup, or if I should make it in CSS. How can I make the button look like this and be responsive?
Use pseudo elements :before and :after, to make the background and the arrow. Use Font Awesome etc if you need a different shape of arrow.
button {
font-size: 3vw;
padding: 2vw;
color: #ffffff;
background: #903;
border: 0;
position: relative;
padding-right: 8vw;
}
button:before {
content: '';
width: 6vw;
position: absolute;
right: 0;
top: 0;
bottom: 0;
background: white;
border: 1px solid #903;
}
button:after {
content: '❯';
position: absolute;
right: 2vw;
color: #903;
}
<button>All Team Members</button>
jsfiddle
try this:
.btn {padding:10px 40px 10px 20px;
width:70%;
border-radius:3px;
border:2px solid inherit;
border-color: #eeeeee;
background-color:rgb(153,0,51);
background-position:center right;
background-repeat:no-repeat;
text-align:center;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#990033', endColorstr='#ffffff',GradientType=1 ); /* IE6-9 */
font-size: .6em
}
.white_txt {color:#ffffff!important;}
.purple_btn {border:2px solid #eeeeee;border-radius:3px;}
<div class="purple_btn btn">
<div class="white_txt">All Team Members</div>
</div>
I have 3 divs
I am using float:left to have the divs in the same line. my problem is that the div1 will have a random width. Div 3 will be always 25 pixels with margin left and right of 1. and then the middle div needs to fill up the remaining space.
What would be the best way to accomplish this and still be supported in all browsers?
Here is what I tried, but the problem is that the % width wont work because div1 will always change in width.
<div class="title-div gradient">
<div class="title-div-left">
<p>Service 1</p>
</div>
<div class="background-line"></div>
<div class="title-div-right">
<img src="ArrowUp.png" alt="▲">
</div>
</div>
</div>
.services-wrapper .expansion-wrap .title-div {
height: 3.5rem;
line-height: 3.5rem;
width: 95.6rem;
font-size: 1.7rem;
color: #FFF;
margin-left: 3.4rem;
background: #6f1505;
/* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzZmMTUwNSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMzNDA4MDEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, #6f1505 0%, #340801 100%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6f1505), color-stop(100%, #340801));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #6f1505 0%, #340801 100%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #6f1505 0%, #340801 100%);
/* Opera 11.10+ */
background: -ms-linear-gradient(top, #6f1505 0%, #340801 100%);
/* IE10+ */
background: linear-gradient(to bottom, #6f1505 0%, #340801 100%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6f1505', endColorstr='#340801',GradientType=0 );
.services-wrapper .expansion-wrap .title-div .title-div-left {
float: left;
}
.services-wrapper .expansion-wrap .title-div .title-div-left p {
margin: 0;
padding-left: 1.7rem;
padding-right: 1rem;
font-size: 2rem;
font-weight: bold;
display: inline;
}
.services-wrapper .expansion-wrap .title-div .background-line {
background-image: url("../images/Line.png");
background-repeat: no-repeat;
background-position: center;
background-position: no-repeat;
width: 50%;
height: 100%;
float: left;
}
.services-wrapper .expansion-wrap .title-div .title-div-right {
float: left;
height: 3.5rem !important;
padding-left: 1rem;
}
.services-wrapper .expansion-wrap .title-div .title-div-right img {
margin-top: 0.5rem;
}
Adding overflow: auto will make the div fill up the remaining space.
Demo: http://jsfiddle.net/aaL8gvhg/
I have the following div structure.
<!DOCTYPE html>
<html>
<head>
<title>Immigration Reform</title>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
</head>
<body>
<link rel="stylesheet" type="Text/css" href="css/test.css" media="screen" />
<div class ="HeaderWrap">
<div class ="Header">
<div Class="HeaderLogo"></div>
</div>
</div>
<div class ="BodyWrap">
<div class="Body clearfix">
<div class ="BodyLeft">
<div class ="HeadingBar1"><h7>You Have Questions?</h7></div>
<div class="list1">
<div class="HeadingBar2"><h7>We Provide Answers!</h7></div>
<div class="List2"></div>
</div>
</div>
<div class ="BodyRight">
<div class ="BodyRightText1"></div>
<div class ="BodyRightText2"></div>
<div class ="BodyRightText3"></div>
</div>
</div>
</div>
<div class ="FooterWrap">
<div class ="Footer">
<div class="FooterPicture"></div>
<div class ="Footer1"></div>
<div class ="Footer2"></div>
<div class ="Fotter3"></div>
<div class ="Footer4"></div>
</div>
</div>
</body>
</html
My problem is with the BodyLeft div which contains several other nested divs. the structure seems to work properly until the Bodyleft div get to a certain size and forces list2 text to pass the div and not push the footer down. here is an example of what happens.
https://www.dropbox.com/s/ukfq84b95unhytd/sampletext.PNG?dl=0
CSS Code
body{
margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;
padding: 0;
#color: black; font-size: 10pt; font-family: "Trebuchet MS", sans-serif;
#background-color: red;
#overflow: hidden;
}
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
zoom: 1; /* ie 6/7 */
}
.dropcap {
font-size: 300%;
float: left;
line-height: 0.8em;
padding: 0 2px 0 0;
color:#690A22;
font-family: 'Helvetica Neue';
font-weight: bold;
position: relative;
left: -3px;
}
.HeaderWrap,
.BodyWrap,
.FooterWrap{float:left; width:100%; border:1px solid yellow; clear:both;}
.Header,
.HeaderBottom,
.Body,
.Footer{width:960px; border: 1px solid red; margin:0 auto; clear:both;}
.Header{height:227px; background:url("../Images/man-with-flag-1.png") no-repeat;#box-shadow: 0 0 20px 0 black; z-index:-1
-webkit-box-shadow: 4px 1px 18px 0px rgba(0,0,0,0.75);
-moz-box-shadow: 4px 1px 18px 0px rgba(0,0,0,0.75);
box-shadow: 4px 1px 18px 0px rgba(0,0,0,0.75);clear:both;}
.HeaderLogo{float:left; height:100px; width:150px; box-shadow: 10px 10px 5px #000000; background:url("../Images/visa.png") no-repeat; position:relative; right:-45px; bottom:-165px; border:5px solid white; z-index:999;clear:both;}
.Body {position: relative; min-height: 550px;
-webkit-box-shadow: 4px 1px 18px 0px rgba(0,0,0,0.75);
-moz-box-shadow: 4px 1px 18px 0px rgba(0,0,0,0.75);
box-shadow: 4px 1px 18px 0px rgba(0,0,0,0.75); clear:both;}
.BodyLeft{float:left; min-height: 950px; #border:1px solid yellow; position: relative; #top: -90px; z-index:-1;background:#b1b6bc; box-shadow: 0 0 15px 0 black; width:26%; clear:both;}
.HeadingBar1{float:left; line-height:50px; width:250px;text-indent: 10px; font-weight: bold; position:relative; top:100px; vertical-align:middle; #border:1px solid yellow;
background: #265884; /* Old browsers */
background: -moz-linear-gradient(left, #265884 0%, #000000 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#265884), color-stop(100%,#000000)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #265884 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #265884 0%,#000000 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, #265884 0%,#000000 100%); /* IE10+ */
background: linear-gradient(to right, #265884 0%,#000000 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#265884', endColorstr='#000000',GradientType=1 ); /* IE6-9 */}
.list1{clear:both; position:relative; top:110px; color:#690A22; #border:1px solid yellow;}
.HeadingBar2{float:left; line-height:50px; width:250px;text-indent: 10px; font-weight: bold; position:relative; vertical-align:middle; #top:250px; #border:1px solid yellow;
background: #265884; /* Old browsers */
background: -moz-linear-gradient(left, #265884 0%, #000000 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#265884), color-stop(100%,#000000)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #265884 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #265884 0%,#000000 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, #265884 0%,#000000 100%); /* IE10+ */
background: linear-gradient(to right, #265884 0%,#000000 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#265884', endColorstr='#000000',GradientType=1 ); /* IE6-9 */}
.List2 {clear: both; position:relative; top:20px; #border:1px solid yellow; margin:20px; text-align: center}
.BodyRight{float:right; min-height: 700px; #background:yellow; position: relative; #top: -150px; z-index:-1; #border:1px solid green; width:73%}
.LeftText{float:left; width:248px; border:1px solid white; position:relative; top:55px}
.BodyRightText1{float:left; #border:2px solid green; position: relative; width:98%; min-height: 690px; margin: 0 5px 0 5px;text-align:justify; z-index:-1}
.Footer{position:relative; z-index:-1; height:70px; background:#1c2f3d;background:url("../Images/footer2.png") no-repeat;
-webkit-box-shadow: 4px 1px 18px 0px rgba(0,0,0,0.75);
-moz-box-shadow: 4px 1px 18px 0px rgba(0,0,0,0.75);
box-shadow: 4px 1px 18px 0px rgba(0,0,0,0.75);}
#.FooterPicture {float:left;box-shadow: 10px 10px 5px #000000; height:50px; width:248px; #border:5px solid white; background:url("../Images/.png") no-repeat;position:relative; #right:-5px; top:50px; z-index:-1}
h1 { font-size:14pt; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#690A22; }
h2 { font-size:12pt; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#690A22; }
h3 { font-size:10pt; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color:black; }
h7 { font-size:18pt; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#ffffff;}
Here is the code in http://jsfiddle.net/ylafont/b634rL8v/1/
Any Advice?
You are using top to offset the position of a relative element with HeadingBar1 and list1. Instead you should use margin-top and this will accommodate for the offset. Alternatively, add padding-bottom to the end of list1 of the same magnitude as the top offset you are using.
changed css
.HeadingBar1{
float:left;
line-height:50px;
width:250px;
text-indent: 10px;
font-weight: bold;
position:relative;
margin-top:100px; /* CHANGED FROM TOP */
vertical-align:middle;
#border:1px solid yellow;
background: #265884; /* Old browsers */
background: -moz-linear-gradient(left, #265884 0%, #000000 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#265884), color-stop(100%,#000000)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #265884 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #265884 0%,#000000 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, #265884 0%,#000000 100%); /* IE10+ */
background: linear-gradient(to right, #265884 0%,#000000 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#265884', endColorstr='#000000',GradientType=1 ); /* IE6-9 */
}
.list1{
clear:both;
position:relative;
margin-top:110px; /* CHANGED FROM TOP */
color:#690A22;
#border:1px solid yellow;
}
PS. what are your doing with the # before some of your attributes? this is invalid css and isnt how to comment things out if thats what you're attempting (should use /**/ instead)
updated FIDDLE
Remove position:relative; from .list1 and .list2 ... this should fix push the footer down!
Also your are missing the starting unordered list tags <ul></ul> around your list items <li></li> in .list2.
You should also end all you rules in CSS with a ; (even the last ones). Might be worth running your css through a css validator.
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.