I am trying to align 3 divs under each other, I believe it is because of the vertical-align I used. I am trying to fix it up for the #media, when its at 480px to align the divs underneath. For some reason I am unable to accomplish this. I have spent about 3 hours trying to do this. Any help/suggestions is much appreciated.
Image:
HTML:
<div class="features">
<div id="features-title">
<p>Features fitted just for your website</p>
<hr>
</div>
<div class="features-body">
<div id="features-body-pages">
<div id="features-body-pages-title">
<p>Your Site</p>
</div>
<div id="features-body-pages-subtitle">
<p>User accessibility.</p>
</div>
<hr>
<div id="features-body-pages-main">
<p>From navigation to user accessibility, we make your website easy for your visitors to navigate around. You don't want your visitors leaving, and neither do we! That's why we make your site appealing.</p>
</div>
</div>
<div id="features-body-support">
<div id="features-body-support-title">
<p>24/7 Support</p>
</div>
<div id="features-body-support-subtitle">
<p>Never hesitate.</p>
</div>
<hr>
<div id="features-body-support-main">
<p>Unlike most places, we actually offer 24/7 support with minimum wait time. Even after your website has been delivered, it's not to late to ask for help. We are always here and glade to help.</p>
</div>
</div>
<div id="features-body-types">
<div id="features-body-types-title">
<p>Types of websites</p>
</div>
<div id="features-body-types-subtitle">
<p>Request any kind of site.</p>
</div>
<hr>
<div id="features-body-types-main">
<p>You name it, we make it! From small personal sites to large company sites. All you need to do is provide us with the website information, and we will do the rest.
</div>
</div>
</div>
</div>
CSS:
body {
margin: 0;
background-image: url("../images/CrystalDevLogo.png");
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
}
ul.topnav {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #4484CE;
}
ul.topnav li {float: left;}
ul.topnav li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
ul.topnav li a:hover:not(.active) {background-color: #3a88e3;}
ul.topnav li a.active {background-color: #D9D9D9;}
ul.topnav li.right {float: right;}
#media screen and (max-width: 600px){
ul.topnav li.right,
ul.topnav li {float: none;}
}
.cover-image {
width: 100%;
height: auto;
position: absolute;
z-index: -1;
}
.cover-image img {
width: 100%;
height: auto;
opacity: 0.5;
filter: alpha(opacity=50);
z-index: -1;
}
#alert-motd {
text-align: center;
overflow: hidden;
position: relative;
height: 50px;
}
#alert-motd p {
font-size: 18px;
position: absolute;
width: 100%;
height: 100%;
margin: 0;
text-align: center;
/* Starting position */
-moz-transform:translateX(100%);
-webkit-transform:translateX(100%);
transform:translateX(100%);
/* Apply animation to this element */
-moz-animation: scroll-left 25s linear infinite;
-webkit-animation: scroll-left 25s linear infinite;
animation: scroll-left 25s linear infinite;
}
/* Move it (define the animation) */
#-moz-keyframes scroll-left {
0% { -moz-transform: translateX(100%); }
100% { -moz-transform: translateX(-100%); }
}
#-webkit-keyframes scroll-left {
0% { -webkit-transform: translateX(100%); }
100% { -webkit-transform: translateX(-100%); }
}
#keyframes scroll-left {
0% {
-moz-transform: translateX(100%); /* Browser bug fix */
-webkit-transform: translateX(100%); /* Browser bug fix */
transform: translateX(100%);
}
100% {
-moz-transform: translateX(-100%); /* Browser bug fix */
-webkit-transform: translateX(-100%); /* Browser bug fix */
transform: translateX(-100%);
}
}
#media all and (max-width: 1690px) {
.body-quote {
float: left;
margin-left: 10px;
margin-top: 10px;
width: 280px;
height: auto;
background-image: linear-gradient(#17A3DC, #157DA8);
border-radius: 15px;
box-shadow:
0px 2px 2px 5px #555,
0px 4px 4px 5px #555,
0px 6px 6px 5px #555,
0px 8px 8px 5px #555;
}
.body-quote-title {
text-align: left;
font-size: 30px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-quote-subtitle {
text-align: left;
font-size: 16px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-quote-body {
height: auto;
width: auto;
text-align: center;
padding-bottom: 8px;
}
.body-quote-body #free-quote {
border-radius: 15px;
background-color: #24BF39;
}
.body-quote-body #schedule-appointment {
border-radius: 15px;
background-color: #24BF39;
}
.body-help {
float: right;
margin-right: 10px;
margin-top: 10px;
width: 280px;
height: auto;
background-image: linear-gradient(#17A3DC, #157DA8);
border-radius: 15px;
box-shadow:
0px 2px 2px 5px #555,
0px 4px 4px 5px #555,
0px 6px 6px 5px #555,
0px 8px 8px 5px #555;
}
.body-help-title {
text-align: left;
font-size: 30px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-help-subtitle {
text-align: left;
font-size: 16px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-help-body {
height: auto;
width: auto;
text-align: center;
padding: 0px 8px 0px 8px;
color: white;
}
.body-help-body p {
padding: 8px 8px 0px 8px;
}
.body-help-body #help-contact {
border-radius: 15px;
background-color: #24BF39;
}
.features {
margin: 0 auto;
width: 90%;
text-align: center;
background-color: rgba(193, 196, 195, .6);
margin-top: 500px;
border-radius: 15px;
}
.features-body {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0px 15px 15px;
}
.features #features-title {
font-size: 50px;
font-style: bold;
background-color: rgba(75, 180, 44, .6);
border-radius: 15px;
color: black;
}
.features #features-body-pages {
background-color: #F65555;
border-radius: 5px;
width: 200px;
height: auto;
}
.features #features-body-pages-title {
background-color: rgb(77, 202, 40);
border-radius: 5px;
width: 200px;
height: auto;
color: white;
font-size: 26px;
display: table-cell;
vertical-align: middle;
}
.features #features-body-pages-subtitle {
width: auto;
height: auto;
font-size: 20px;
}
.features #features-body-pages hr {
border: none;
height: 2px;
color: #333;
background-color: #333;
width: 90%;
}
.features #features-body-support {
background-color: #F65555;
border-radius: 5px;
width: 200px;
height: auto;
}
.features #features-body-support-title {
background-color: rgb(77, 202, 40);
border-radius: 5px;
width: 200px;
height: auto;
color: white;
font-size: 26px;
display: table-cell;
vertical-align: middle;
}
.features #features-body-support-subtitle {
width: auto;
height: auto;
font-size: 20px;
}
.features #features-body-support hr {
border: none;
height: 2px;
color: #333;
background-color: #333;
width: 90%;
}
.features #features-body-support-main {
padding: 10px 10px 10px 10px;
}
.features #features-body-types {
background-color: #F65555;
border-radius: 5px;
width: 200px;
height: auto;
}
.features #features-body-types-title {
background-color: rgb(77, 202, 40);
border-radius: 5px;
width: 200px;
height: auto;
color: white;
font-size: 26px;
display: table-cell;
vertical-align: middle;
}
.features #features-body-types-subtitle {
width: auto;
height: auto;
font-size: 20px;
}
.features #features-body-types hr {
border: none;
height: 2px;
color: #333;
background-color: #333;
width: 90%;
}
.features #features-body-types-main {
padding: 10px 10px 10px 10px;
}
.contact {
background-color: rgba(193, 196, 195, .6);
border-radius: 15px;
text-align: center;
margin-top: 200px !important;
width: 90%;
margin: 0 auto;
}
.contact #contact-header {
border-radius: 10px;
background-color: rgba(80, 140, 205, .9);
width: 90%;
margin: 0 auto;
color: black;
}
.contact #contact-title {
font-size: 50px;
font-style: bold;
text-align: center;
}
.contact #contact-subtitle {
font-size: 22px;
font-style: bold;
}
.contact #contact-info-email {
font-size: 20px;
font-style: bold;
}
.contact #contact-info-phone {
font-size: 20px;
font-style: italic;
font-style: bold;
}
.contact-form {
width: 600px;
margin: 0 auto;
}
}
#media all and (max-width: 1280px) {
.body-quote {
float: left;
margin-left: 10px;
margin-top: 10px;
width: 280px;
height: auto;
background-image: linear-gradient(#17A3DC, #157DA8);
border-radius: 15px;
box-shadow:
0px 2px 2px 5px #555,
0px 4px 4px 5px #555,
0px 6px 6px 5px #555,
0px 8px 8px 5px #555;
}
.body-quote-title {
text-align: left;
font-size: 30px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-quote-subtitle {
text-align: left;
font-size: 16px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-quote-body {
height: auto;
width: auto;
text-align: center;
padding-bottom: 8px;
}
.body-quote-body #free-quote {
border-radius: 15px;
background-color: #24BF39;
}
.body-quote-body #schedule-appointment {
border-radius: 15px;
background-color: #24BF39;
}
.body-help {
float: right;
margin-right: 10px;
margin-top: 10px;
width: 280px;
height: auto;
background-image: linear-gradient(#17A3DC, #157DA8);
border-radius: 15px;
box-shadow:
0px 2px 2px 5px #555,
0px 4px 4px 5px #555,
0px 6px 6px 5px #555,
0px 8px 8px 5px #555;
}
.body-help-title {
text-align: left;
font-size: 30px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-help-subtitle {
text-align: left;
font-size: 16px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-help-body {
height: auto;
width: auto;
text-align: center;
padding: 0px 8px 0px 8px;
color: white;
}
.body-help-body p {
padding: 8px 8px 0px 8px;
}
.body-help-body #help-contact {
border-radius: 15px;
background-color: #24BF39;
}
.features {
margin: 0 auto;
width: 90%;
text-align: center;
background-color: rgba(193, 196, 195, .6);
margin-top: 500px;
border-radius: 15px;
}
.features-body {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0px 15px 15px;
}
.features #features-title {
font-size: 50px;
font-style: bold;
background-color: rgba(75, 180, 44, .6);
border-radius: 15px;
color: black;
}
.features #features-body-pages {
background-color: #F65555;
border-radius: 5px;
width: 200px;
height: auto;
}
.features #features-body-pages-title {
background-color: rgb(77, 202, 40);
border-radius: 5px;
width: 200px;
height: auto;
color: white;
font-size: 26px;
display: table-cell;
vertical-align: middle;
}
.features #features-body-pages-subtitle {
width: auto;
height: auto;
font-size: 20px;
}
.features #features-body-pages hr {
border: none;
height: 2px;
color: #333;
background-color: #333;
width: 90%;
}
.features #features-body-support {
background-color: #F65555;
border-radius: 5px;
width: 200px;
height: auto;
}
.features #features-body-support-title {
background-color: rgb(77, 202, 40);
border-radius: 5px;
width: 200px;
height: auto;
color: white;
font-size: 26px;
display: table-cell;
vertical-align: middle;
}
.features #features-body-support-subtitle {
width: auto;
height: auto;
font-size: 20px;
}
.features #features-body-support hr {
border: none;
height: 2px;
color: #333;
background-color: #333;
width: 90%;
}
.features #features-body-support-main {
padding: 10px 10px 10px 10px;
}
.features #features-body-types {
background-color: #F65555;
border-radius: 5px;
width: 200px;
height: auto;
}
.features #features-body-types-title {
background-color: rgb(77, 202, 40);
border-radius: 5px;
width: 200px;
height: auto;
color: white;
font-size: 26px;
display: table-cell;
vertical-align: middle;
}
.features #features-body-types-subtitle {
width: auto;
height: auto;
font-size: 20px;
}
.features #features-body-types hr {
border: none;
height: 2px;
color: #333;
background-color: #333;
width: 90%;
}
.features #features-body-types-main {
padding: 10px 10px 10px 10px;
}
}
#media all and (max-width: 980px) {
}
#media all and (max-width: 736px) {
.body-quote, .body-help { float: none; margin:auto;}
.features #features-body-types, .features #features-body-support, .features #features-body-pages {
display: inline;
margin: auto;
}
}
#media all and (max-width: 480px) {
.body-quote {
margin: 0 auto;
width: 280px;
background-image: linear-gradient(#17A3DC, #157DA8);
border-radius: 15px;
box-shadow:
0px 2px 2px 5px #555,
0px 4px 4px 5px #555,
0px 6px 6px 5px #555,
0px 8px 8px 5px #555;
}
.body-quote-title {
text-align: left;
font-size: 30px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-quote-subtitle {
text-align: left;
font-size: 16px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-quote-body {
height: auto;
width: auto;
text-align: center;
padding-bottom: 8px;
}
.body-quote-body #free-quote {
border-radius: 15px;
background-color: #24BF39;
}
.body-quote-body #schedule-appointment {
border-radius: 15px;
background-color: #24BF39;
}
.body-help {
left: 0;
right: 0;
margin: 0 auto;
width: 280px;
height: auto;
background-image: linear-gradient(#17A3DC, #157DA8);
border-radius: 15px;
box-shadow:
0px 2px 2px 5px #555,
0px 4px 4px 5px #555,
0px 6px 6px 5px #555,
0px 8px 8px 5px #555;
}
.body-help-title {
text-align: left;
font-size: 30px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-help-subtitle {
text-align: left;
font-size: 16px;
width: auto;
height: auto;
color: white;
padding: 0px 8px 0px 8px;
}
.body-help-body {
height: auto;
width: auto;
text-align: center;
padding: 0px 8px 0px 8px;
color: white;
}
.body-help-body p {
padding: 8px 8px 0px 8px;
}
.body-help-body #help-contact {
border-radius: 15px;
background-color: #24BF39;
}
.features {
text-align: center;
width: 90%;
text-align: center;
background-color: rgba(193, 196, 195, .6);
margin-top: 500px;
border-radius: 15px;
height: auto;
}
.features-body {
padding: 0px 15px 15px;
}
.features #features-title {
font-size: 50px;
font-style: bold;
background-color: rgba(75, 180, 44, .6);
border-radius: 15px;
color: black;
}
.features #features-body-pages {
background-color: #F65555;
border-radius: 5px;
width: auto;
height: auto;
float: left;
}
.features #features-body-pages-title {
background-color: rgb(77, 202, 40);
border-radius: 5px;
width: 200px;
height: auto;
color: white;
font-size: 26px;
}
.features #features-body-pages-subtitle {
width: auto;
height: auto;
font-size: 20px;
}
.features #features-body-pages hr {
border: none;
height: 2px;
color: #333;
background-color: #333;
width: 90%;
}
.features #features-body-pages-main {
padding: 10px 10px 10px 10px;
}
.features #features-body-support {
background-color: #F65555;
border-radius: 5px;
width: auto;
height: auto;
float: left;
}
.features #features-body-support-title {
background-color: rgb(77, 202, 40);
border-radius: 5px;
width: 200px;
height: auto;
color: white;
font-size: 26px;
}
.features #features-body-support-subtitle {
width: auto;
height: auto;
font-size: 20px;
}
.features #features-body-support hr {
border: none;
height: 2px;
color: #333;
background-color: #333;
width: 90%;
}
.features #features-body-support-main {
padding: 10px 10px 10px 10px;
}
.features #features-body-types {
background-color: #F65555;
border-radius: 5px;
width: auto;
height: auto;
float: left;
}
.features #features-body-types-title {
background-color: rgb(77, 202, 40);
border-radius: 5px;
width: 200px;
height: auto;
color: white;
font-size: 26px;
}
.features #features-body-types-subtitle {
width: auto;
height: auto;
font-size: 20px;
}
.features #features-body-types hr {
border: none;
height: 2px;
color: #333;
background-color: #333;
width: 90%;
}
.features #features-body-types-main {
padding: 10px 10px 10px 10px;
}
.contact {
background-color: rgba(193, 196, 195, .6);
border-radius: 15px;
text-align: center;
margin-top: 200px !important;
width: 90%;
margin: 0 auto;
}
.contact #contact-header {
border-radius: 10px;
background-color: rgba(80, 140, 205, .9);
width: 90%;
margin: 0 auto;
color: black;
}
.contact #contact-title {
font-size: 50px;
font-style: bold;
text-align: center;
}
.contact #contact-subtitle {
font-size: 22px;
font-style: bold;
}
.contact #contact-info-email {
font-size: 20px;
font-style: bold;
}
.contact #contact-info-phone {
font-size: 20px;
font-style: italic;
font-style: bold;
}
.contact-form {
width: auto;
margin: 0 auto;
}
}
Just set all of them are float: left and put them inside a container which has enough wide in order to fit them, so that the others will be pushed down.
div id="myDIV">
<div>content 1</div>
<div>content 2</div>
<div>content 3</div>
<div>content 4</div>
</div>
CSS:
#myDIV{
width: 800px;
}
#myDIV div {
float: left;
height: 400px;
width: 400px;
}
Related
I have used mobile-first development to style a web page. The problem is that the media query for the bigger screen overrides the media query for mobile screen. here is how my mobile screen should look like
Here is instead how it looks like with the media query that shouldn't affect it
here is my css file
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
-webkit-animation: bgcolor 170s infinite;
animation: bgcolor 170s infinite;
-webkit-animation-direction: alternate;
animation-direction: alternate;
font-family: 'Varela Round', sans-serif;
}
#message{
padding-left: 30px; position: fixed; bottom: 80px; width: 100%; height: 100px; padding-bottom: 20px;
z-index: 9;
}
#message input{
width: 80%;
border: 1px solid darkgrey;
height: 100%;
padding: 30px;
border-radius: 10px;
-webkit-box-shadow: -9px -9px 21px 0px rgba(54,54,54,0.66);
-moz-box-shadow: -9px -9px 21px 0px rgba(54,54,54,0.66);
box-shadow: -9px -9px 21px 0px rgba(54,54,54,0.66);
outline: none;
}
#message input:hover{
cursor: pointer;
font-size: 30px;
}
#message button{
width: 10%;
z-index: 9;
height: 100px;
border: none;
background: white;
border-radius: 10px;
margin-left: 10px;
outline: none;
-webkit-box-shadow: -9px -9px 21px 0px rgba(54,54,54,0.66);
-moz-box-shadow: -9px -9px 21px 0px rgba(54,54,54,0.66);
box-shadow: -9px -9px 21px 0px rgba(54,54,54,0.66);
}
#message button:hover{
cursor: pointer;
}
#chat-area{
height: 90%;
width: 100%;
position: fixed;
z-index: 7;
overflow-y:auto;
margin-bottom: 0;
margin-top: 40%;
border-radius: 100px;
-webkit-box-shadow: 0px -7px 62px 1px rgba(0,0,0,0.75);
-moz-box-shadow: 0px -7px 62px 1px rgba(0,0,0,0.75);
box-shadow: 0px -7px 62px 1px rgba(0,0,0,0.75);
}
.messageL{
float: left;
margin-left: 30px;
border-radius: 10px;
max-width: 45%;
min-width: 400px;
// min-height: 100px;
background-color: white;
padding: 20px;
margin-bottom: 10px;
margin-top: 20px;
clear: both;
}
.user{
margin-bottom: 5px;
font-size: 22px;
}
.content{
font-size: 18px;
}
.messageR{
float: right;
margin-right: 30px;
border-radius: 10px;
max-width: 45%;
min-width: 400px;
//min-height: 100px;
background-color: white;
padding: 20px;
margin-bottom: 10px;
margin-top: 20px;
clear: both;
}
.messageG:last-of-type{
margin-bottom: 400px;
}
.messageC{
text-align: center;
border-radius: 10px;
max-width: 70%;
min-width: 400px;
min-height: 70px;
font-weight: bold;
font-size: 20px;
margin-left: 20%;
margin-right: 20%;
padding: 20px;
margin-bottom: 45px;
margin-top: 20px;
background:rgba(110,109,109,0.5);
clear: both;
}
.messageC:first-of-type{
margin-top: 160px;
}
#header{
position: fixed;
padding: 10px;
margin-bottom: 70px;
min-height: 100px;
width: 100%;
font-family: 'Varela Round', sans-serif;
}
#roomname{
font-size: 70px;
width: 90%;
text-align: center;
border: 3px solid red;
margin: 15px;
padding: 15px;
border-radius: 40px;
position: relative;
}
#typing{
max-width: 90%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin: 40px;
font-size: 30px;
position: absolute;
left: 75px;
top:170px;
border: 3px solid red;
background-color: white;
border-radius: 30px;
padding: 30px;
}
#online{
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin: 40px;
font-size: 30px;
position: absolute;
left: 35px;
top:80px;
background-color: red;
color: white;
border-radius: 30px;
padding: 30px;
}
#media only screen and (min-width:450px) {
#header {
min-height: 50px;
}
#roomname {
font-size: 17px;
text-align: left;
width: 50%;
}
#online{
font-size: 17px;
left: 480px;
top:15px;
padding: 10px;
}
#typing{
font-size: 12px;
left: 100px;
min-width: 200px;
top:30px;
padding: 10px;
background-color: white;
}
#chat-area {
margin-top: 15%;
}
#message {
height: 20px;
padding: 5px;
font-size: 10px;
bottom: 60px;
}
#message input {
height: 50%;
padding: 20px;
}
#message input:hover{
font-size: 15px;
}
#message button {
height: 40px;
}
.messageC {
min-height: 30px;
padding: 10px;
margin-bottom: 25px;
margin-top: 10px;
font-size: 15px;
max-width: 50%;
text-align: center;
}
.messageC:first-of-type{
margin-top: 80px;
}
.messageR {
max-width: 23%;
min-width: 200px;
font-size: 13px;
padding: 10px;
}
.user{
font-size: 18px;
}
}
I would like the query to affect just the screens with the right size
I'm working a project which consists of creating a web application. Currently, I'm focusing on the general design and layout of the website. First of all, I want a horizontal dark grey header on the top. Below that, I want two columns, one with a navigation bar, and one with the content.
Actual result
Desired result
Below is my code and I'm not sure what's causing the issue of the dark header on top not showing up.
Full CSS file: https://pastebin.com/kpUHV71Z
<section class="management">
<div class="header-div">
<img src="Golf.png" class="management-logo" height="50" width="50">
<h1 class="impact" id="management-header">Management Dashboard</h1>
</div>
<div class="left left-nav">
<ul>
<li>Home</li>
<li>News</li>
<li>Contact</li>
<li>About</li>
</ul>
</div>
<div class="right">
<h3>Staff</h3>
</div>
<div class="clear"></div>
</section>
You need to assign a display and a width to your header
.header-div {
background-color: #555555;
border-radius: 5px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
height: auto;
width: 100%;
display: inline-block;
}
This will make the header behave as a block and let you navigation adjust
Hope this is what you were looking for. Happy to explain or help in a better solution if needed.
body {
text-align: center;
background-image: url("background.jpg");
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
font-family: verdana;
}
.selection-menu {
margin-top: 50px;
}
#special-button {
margin-top: 100px;
margin-left: 200px;
}
#special-button2 {
margin-top: 100px;
margin-left: 400px;
}
#header {
margin-top: 10px;
font-weight: bold;
font-size: 60px;
color: white;
}
#author {
font-weight: normal;
font-size: 25px;
margin-top: -40px;
color: white;
padding-bottom: 20px;
}
.club-selection {
font-weight: bold;
margin-top: 20px;
font-size: 50px;
}
.input-header {
font-weight: bold;
margin-top: 20px;
font-size: 50px;
}
.impact {
font-family: Montserrat;
}
.index-section {
background-color: rgb(242,242,242);
border-radius: 5px;
width: 50%;
margin: auto;
padding-bottom: 25px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
margin-top: 50px;
}
table {
border-collapse: collapse;
margin: auto;
margin-top: 10px;
}
table td, table th {
border: 1px solid lightgrey;
padding: 2px;
}
.management {
background-color: rgb(242,242,242);
border-radius: 5px;
width: 90%;
margin: auto;
padding-bottom: 25px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
margin-top: 50px;
}
h3 {
font-size: 40px;
font-family: Montserrat;
margin-bottom: 10px;
}
.separate {
width: 95%;
margin: auto;
margin-top: 20px;
margin-bottom: -30px;
}
.buttongroup {
display: inline;
}
input {
display: inline;
}
button {
background-color: #555555;
border: none;
color: white;
padding: 7px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 5px;
}
button:hover {
background-color: lightgrey;
color: black;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
input {
border: none;
height: 3%;
}
#appdescription {
margin-top: 40px;
margin-bottom: -10px;
}
.inline-alignment {
display: inline;
margin-bottom: 20px;
}
img {
margin-left: 20px;
}
.header-div {
background-color: #555555;
border-radius: 5px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
height: auto;
width: 100%;
display: inline-block;
}
.left {
width: 25%;
float: left;
}
.right {
margin-left: 25%;
}
.clear {
clear: both;
}
.management-logo {
float: left;
clear: right;
margin-right: 20px;
}
#management-header {
margin-top: 10px;
font-weight: bold;
font-size: 30px;
color: white;
float: left;
margin: 0;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 200px;
background-color: grey;
}
li a {
display: block;
color: #000;
padding: 8px 16px;
text-decoration: none;
}
li a:hover {
background-color: #555;
color: white;
}
.left-nav {
background-color: grey;
}
<section class="management">
<div class="header-div">
<img src="Golf.png" class="management-logo" height="50" width="50">
<h1 class="impact" id="management-header">Management Dashboard</h1>
</div>
<div class="left left-nav">
<ul>
<li>Home</li>
<li>News</li>
<li>Contact</li>
<li>About</li>
</ul>
</div>
<div class="right">
<h3>Staff</h3>
</div>
<div class="clear"></div>
</section>
You have to left-floated elements (logo and title) and no clears on your header-div, so it effectively has zero height.
So adjust with a clearfix, or use inline-block or flexbox instead of floats.
.management-logo {
margin-right: 20px;
display:inline-block;
}
#management-header {
margin-top: 10px;
font-weight: bold;
font-size: 30px;
color: white;
margin: 0;
display:inline-block;
}
https://jsfiddle.net/49m5395n/13/
I really love display: flex; and thats why I recomend it for everyone. It isn't too much heavy and saves a LOT of styling. I sugest you to study it.
Anyway, here is my contribution:
body {
text-align: center;
background-image: url("background.jpg");
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
font-family: verdana;
}
.header {
display: flex;
background: #555;
}
.canvas {
display: flex;
}
.navigation {
width: 25%;
}
.content {
width: 75%;
}
/* YOUR CODE BELOW*/
.selection-menu {
margin-top: 50px;
}
#special-button {
margin-top: 100px;
margin-left: 200px;
}
#special-button2 {
margin-top: 100px;
margin-left: 400px;
}
#header {
margin-top: 10px;
font-weight: bold;
font-size: 60px;
color: white;
}
#author {
font-weight: normal;
font-size: 25px;
margin-top: -40px;
color: white;
padding-bottom: 20px;
}
.club-selection {
font-weight: bold;
margin-top: 20px;
font-size: 50px;
}
.input-header {
font-weight: bold;
margin-top: 20px;
font-size: 50px;
}
.impact {
font-family: Montserrat;
}
.index-section {
background-color: rgb(242, 242, 242);
border-radius: 5px;
width: 50%;
margin: auto;
padding-bottom: 25px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
margin-top: 50px;
}
table {
border-collapse: collapse;
margin: auto;
margin-top: 10px;
}
table td,
table th {
border: 1px solid lightgrey;
padding: 2px;
}
h3 {
font-size: 40px;
font-family: Montserrat;
margin-bottom: 10px;
}
.separate {
width: 95%;
margin: auto;
margin-top: 20px;
margin-bottom: -30px;
}
.buttongroup {
display: inline;
}
input {
display: inline;
}
button {
background-color: #555555;
border: none;
color: white;
padding: 7px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 5px;
}
button:hover {
background-color: lightgrey;
color: black;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
input {
border: none;
height: 3%;
}
#appdescription {
margin-top: 40px;
margin-bottom: -10px;
}
.inline-alignment {
display: inline;
margin-bottom: 20px;
}
img {
margin-left: 20px;
}
.header-div {
background-color: #555555;
border-radius: 5px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
height: auto;
}
.left {
width: 25%;
float: left;
}
.right {
margin-left: 25%;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 200px;
background-color: grey;
}
li a {
display: block;
color: #000;
padding: 8px 16px;
text-decoration: none;
}
li a:hover {
background-color: #555;
color: white;
}
.left-nav {
background-color: grey;
}
<header class="header">
<img src="golf.png" height="50" width="50">
<h1 class="impact">Management Dashboard</h1>
</header>
<div class="canvas">
<div class="navigation">
<ul>
<li>Home</li>
<li>News</li>
<li>Contact</li>
<li>About</li>
</ul>
</div>
<div class="content">
<h3>Content</h3>
</div>
</div>
I have this login form, which works and looks just fine in Chrome, IE11 and Edge but when try it out on Firefox, it looks completely different;
My labels are not the same width, so I have to re-adjust them. Also, my submit button doesn't seem to take on styles.
How can I make this work with Firefox as well?
My HTML:
<div class="loginheader">تسجيل الدخول</div>
<div class="loginform">
<form action="login.php" method="post" name="myform" id="myform">
<p>
<label for="loginform">اسم المستخدم</label>
<input type="text" name="username" id="login" value="mohammed.nasyia#gmail.com" placeholder="اسم المستخدم" />
</p>
<p>
<label for="loginform">كلمة المرور</label>
<input type="password" name="password" id="password" value="mohammed.nasyia#gmail.com" placeholder="كلمة المرور" />
</p>
<p >
<input type="submit" name="submit" value="تسجيل الدخول" class="button admin-login-button"/>
</p>
</form>
</div>
<div class="loginfooter">
تسجيل الدخول كممتحن
</div>
</div>
CSS:
.login-container {
margin-top: 100px;
margin-bottom: 50px;
margin-left: auto;
margin-right: auto;
width: 600px;
}
.loginform {
direction:RTL;
padding: 55px;
background-color: #fff;
border: 1px solid #eee;
border-bottom: 0px;
border-top: 0px;
}
.loginheader {
text-align: center;
background-color: #f5f5f5;
padding: 15px 0px;
border-radius: 10px 10px 0 0;
font-size: 30px;
}
.loginfooter {
padding: 15px 40px;
background-color: #f5f5f5;
border-radius: 0px 0px 10px 10px;
font-size: 18px;
text-align: center;
}
.loginheader, .loginfooter {
background-color: #f5f5f5;
border: 1px solid #ededed;
}
a {
text-decoration: none;
color: #000;
}
input[type=text], input[type=password] {
padding: 0 10px;
width: 320px;
height: 38px;
font-size: 16px;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
}
label {
float: rihgt;
width: 100px;
line-height: 40px;
padding-left: 10px;
font-size: 18px;
text-align: left;
display: inline-block;
margin: 10px 0px;
}
.edit-examinee label{
float: rihgt;
width: 130px;
line-height: 40px;
padding-left: 10px;
font-size: 18px;
text-align: left;
display: inline-block;
margin: 10px 0px;
}
.loginform label {
float: rihgt;
width: 100px;
line-height: 40px;
padding-left: 10px;
font-size: 18px;
text-align: left;
display: inline-block;
margin: 10px 0px;
}
.button {
display: inline-block;
zoom: 1;
padding: 12px 30px;
margin: 0;
cursor: pointer;
border: 1px solid #bbb;
overflow: visible;
font: bold 16px arial, helvetica, sans-serif;
text-decoration: none;
white-space: nowrap;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
.admin-login-button {
margin-right: 350px;
color: #333;
background-color: #fff;
border-color: #ccc;
}
.admin-login-button:hover {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
}
.admin-login-button:active {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
position: relative;
top: 2px;
text-shadow: none;
box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
}
You can also check the JSFiddle of the form.
I removed the floats (with a typo), set the margin to left on the .admin-login-button. I also added a media query for smaller screens.
https://jsfiddle.net/6p4v9hs6/7/
New CSS here:
.login-container {
margin-top: 100px;
margin-bottom: 50px;
margin-left: auto;
margin-right: auto;
width: 600px;
}
.loginform {
direction:RTL;
padding: 55px;
background-color: #fff;
border: 1px solid #eee;
border-bottom: 0px;
border-top: 0px;
}
.loginheader {
text-align: center;
background-color: #f5f5f5;
padding: 15px 0px;
border-radius: 10px 10px 0 0;
font-size: 30px;
}
.loginfooter {
padding: 15px 40px;
background-color: #f5f5f5;
border-radius: 0px 0px 10px 10px;
font-size: 18px;
text-align: center;
}
.loginheader, .loginfooter {
background-color: #f5f5f5;
border: 1px solid #ededed;
}
a {
text-decoration: none;
color: #000;
}
input[type=text], input[type=password] {
padding: 0 10px;
width: 320px;
height: 38px;
font-size: 16px;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
}
label {
/* float: rihgt; */
width: 100px;
line-height: 40px;
padding-left: 10px;
font-size: 18px;
text-align: left;
display: inline-block;
margin: 10px 0px;
}
.edit-examinee label{
/* float: rihgt; */
width: 130px;
line-height: 40px;
padding-left: 10px;
font-size: 18px;
text-align: left;
display: inline-block;
margin: 10px 0px;
}
.loginform label {
/* float: rihgt; */
width: 100px;
line-height: 40px;
padding-left: 10px;
font-size: 18px;
text-align: left;
display: inline-block;
margin: 10px 0px;
}
.button {
display: inline-block;
zoom: 1;
padding: 12px 30px;
margin: 0;
cursor: pointer;
border: 1px solid #bbb;
overflow: visible;
font: bold 16px arial, helvetica, sans-serif;
text-decoration: none;
white-space: nowrap;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
.admin-login-button {
margin-left: 350px;
color: #333;
background-color: #fff;
border-color: #ccc;
}
.admin-login-button:hover {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
}
.admin-login-button:active {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
position: relative;
top: 2px;
text-shadow: none;
box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
}
#media screen and (max-width: 540px) {
input[type=text], input[type=password] {
width: 90%;
}
}
Seems to work in both Safari and Firefox.
I have a problem with spacing between form fields (and other HTML elements) as seen in the attached images. I've tried many things in the CSS but nothing has worked. I'm not sure if it's a paragraph marging-top setting.
thanks for the help.
.post-content is the class here and div.post-share for the facebook like buttons.
here's my style.css code:
body {
background: #f2f2f2;
padding-top: 58px;
padding-bottom: 15px;
}
.postid-1699 { padding-top: 338px; }
a {
color: #9f9f9f;
}
a:hover {
color: #3f3f3f;
}
a, p, h1, h2, h3, h4, h5, h6, div {
word-wrap: break-word;
}
h1, h2, h3 { letter-spacing: -1px;
}
/* Masonry */
#masonry {
margin: 0 auto;
visibility: hidden;
}
#masonry .thumb {
background: #fff;
border: 1px solid #e5e5e5;
font-size: 0.9em;
float: left;
margin: 0 8px 14px 8px;
position: relative;
width: 250px;
-webkit-box-shadow: 0 5px 10px #D6D6D6;
-moz-box-shadow: 0 5px 10px #D6D6D6;
box-shadow: 0 5px 10px #D6D6D6;
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
#masonry .featured-thumb-link {
display: block;
min-height: 70px;
position: relative;
text-align: center;
width: 100%;
}
#masonry .featured-thumb-gif {
background: transparent url("img/gif_overlay.png") no-repeat;
height: 50px;
width: 50px;
left: 50%;
top: 50%;
margin-left: -25px;
margin-top: -25px;
position: absolute;
}
#masonry .sticky {
background: #ffd;
}
#masonry .masonry-actionbar {
display: none;
font-weight: normal;
height: 25px;
position: absolute;
text-align: center;
top: 5px;
width: 250px;
z-index: 999;
}
#masonry .masonry-actionbar button {
font-weight: normal;
}
#masonry .masonry-actionbar-mobile {
display: none;
}
#masonry .post-title {
line-height: 1.3em;
font-size: 1em;
margin: 3px 0 16px 0;
padding: 5px 10px 0 10px;
text-align: center;
}
#masonry .masonry-meta {
border-top: 1px solid #f5f5f5;
clear: both;
color: #888;
font-size: 0.9em;
line-height: 1.3em;
padding: 5px 10px 10px 10px;
}
#masonry .masonry-meta-author {
font-weight: bold;
}
#masonry .masonry-meta-comment-likes {
border-top: none;
padding-bottom: 5px;
padding-top: 0;
}
#masonry .masonry-meta-comment-likes span {
margin: 0 0.3em;
}
#masonry .masonry-meta-comment {
margin-left: 35px;
}
#masonry .masonry-meta-comment-content {
white-space: pre-wrap;
}
#masonry .masonry-meta-avatar {
float: left;
margin: 2px 0px 5px 0;
width: 26px;
}
#masonry .masonry-meta-avatar img {
height: 26px;
width: 26px;
}
#masonry #reply-title {
}
#masonry .masonry-meta textarea {
height: 27px;
margin-top: 2px;
padding-top: 2px;
resize: none;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#masonry .masonry-meta form {
margin: 0;
}
#ajax-loader-masonry {
left: 50%;
margin-left: -12px;
position: absolute;
top: 400px;
}
#infscr-loading {
background: #000;
bottom: 0;
color: #fff;
left: 50%;
margin-left: -60px;
opacity: 0.3;
padding: 5px;
position: fixed;
text-align: center;
width: 120px;
z-index: 100;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
-webkit-text-shadow: none;
-moz-text-shadow: none;
text-shadow: none;
}
#infscr-loading img {
width: 43px;
}
#post-lightbox {
background: transparent;
bottom: 0;
left: 0;
margin: 0;
overflow-x: auto;
overflow-y: scroll;
position: fixed;
right: 0;
top: 0;
width: 100%;
}
#post-lightbox .post-wrapper {
position : static;
width: 570px;
margin: 25px auto;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.2);
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* Post */
#post-masonry {
position: relative
}
.post-wrapper {
background: transparent;
border: 0px solid #e5e5e5;
margin-bottom: 45px;
-webkit-box-shadow: 0 0px 0px rgba(0,0,0,0.08);
-moz-box-shadow: 0 0px 0px rgba(0,0,0,0.08);
box-shadow: 0 0px 0px rgba(0,0,0,0.08);
z-index: 200;
}
.post-wrapper .h1-wrapper {
border-bottom: 1px solid #eee;
}
.post-wrapper .h1-wrapper h1 {
font-size: 1.5em;
line-height: 1.3em;
margin: 10px 25px;
text-align: center;
}
.post-wrapper .post-top-wrapper {
border-bottom: 1px solid #eee;
min-height: 48px;
padding: 20px 25px;
}
.post-wrapper .post-top-wrapper-header .follow {
font-weight: bold;
margin-top: 8px;
}
.post-wrapper .post-top-wrapper-header {
color: #999;
margin-left: 60px;
}
.post-wrapper .post-top-wrapper-author {
font-size: 1.5em;
font-weight: bold;
line-height: 1.2em;
}
.post-wrapper .post-top-wrapper-header a {
color: #000;
}
.post-wrapper .post-share {
position: absolute;
left: 50%;
margin-left: 320px;
}
.post-share-horizontal {
background: #fafafa;
display: block;
padding: 8px 8px 0 8px;
}
.post-share-horizontal #___plusone_0, .post-share-horizontal #___plusone_1 {
margin-left: -25px !important;
margin-right: -15px !important;
padding-bottom: 13px !important;
}
.post-share .fb_iframe_widget {
display: block;
height: 20px;
overflow: hidden;
width: 90px;
}
.post-share .fb_iframe_widget span {
width: 450px !important;
}
.post-comments-wrapper .fb_iframe_widget span, .post-comments-wrapper .fb_iframe_widget {
width: 100% !important;
}
.post-share-horizontal .pinterest img, .post-share-horizontal .post-embed, .post-share-horizontal .post-email, .post-share-horizontal #post-email-board, .post-share-horizontal .post-report {
margin-top: -14px;
}
.post-wrapper .post-top-meta {
margin: 0 25px;
padding: 20px 0 0 0;
}
.post-wrapper .post-top-meta .pull-right {
color: #a1a1a1;
font-size: 0.9em;
}
.post-wrapper .post-top-meta .pull-right a {
font-weight: bold;
}
.post-wrapper .post-actionbar {
font-weight: normal;
}
.post-wrapper .post-actionbar button {
font-weight: normal;
}
.post-wrapper .post-actionbar .btn {
margin-bottom: 4px;
}
.post-wrapper .featured-thumb {
position: relative;
}
.post-wrapper .post-featured-photo {
background: #f2f2f2;
margin: 24px;
position: relative;
text-align: center;
}
.post-wrapper .post-nav-next {
position: absolute;
margin-top: -10px;
top: 50%;
right: -18px;
}
.post-wrapper .post-nav-prev {
position: absolute;
margin-top: -10px;
top: 50%;
left: -18px;
}
.post-wrapper .post-nav-next a, .post-wrapper .post-nav-prev a {
display: block;
font-size: 15px;
}
.post-wrapper .post-nav-next a:hover, .post-wrapper .post-nav-prev a:hover {
color: #555;
text-decoration: none;
}
.post-wrapper .post-nav-link-lightbox {
border: 1px solid #ccc;
height: 32px;
line-height: 32px;
width: 32px;
-webkit-border-radius: 16px;
-moz-border-radius: 16px;
border-radius: 16px;
-webkit-text-shadow: 1px 1px #fff;
-moz-text-shadow: 1px 1px #fff;
text-shadow: 1px 1px #fff;
}
.post-wrapper .post-nav-link-lightbox i {
display: block;
line-height: 32px;
}
.post-wrapper .post-nav-next-lightbox, .post-wrapper .post-nav-prev-lightbox {
position: fixed;
}
.post-wrapper .post-nav-link-lightbox:hover {
border: 1px solid #aaa;
}
.post-wrapper .post-content {
margin: 25px;
}
.post-wrapper .post-content h1 {
font-size: 1em;
font-weight: normal;
line-height: 1.4em;
}
.post-wrapper .post-content .post-title-large {
font-size: 1.5em;
font-weight: bold;
line-height: 1em;
}
.post-wrapper .post-original-author {
color: #999;
font-size: 0.9em;
}
.post-wrapper .post-original-author a {
font-weight: bold;
}
.post-wrapper .post-content .thecontent img {
height: auto;
}
.post-wrapper .post-comments {
border-top: 1px solid #eee;
padding-top: 20px;
}
.post-wrapper .post-comments-wrapper {
margin: 0 25px;
}
.post-wrapper .post-board {
border-top: 1px solid #eee;
margin-bottom: 16px;
}
.post-wrapper .post-board-wrapper {
margin: 0 25px;
}
.post-wrapper .post-board-wrapper h4 {
font-size: 1.1em;
margin-top: 12px;
}
.post-wrapper .post-board-wrapper .follow {
font-weight: bold;
margin-top: -2px;
}
.post-wrapper .post-board-wrapper a {
font-weight: bold;
}
.post-wrapper .post-board-photo {
background: #fcfcfc;
border-right: 4px solid #fff;
border-bottom: 4px solid #fff;
float: left;
height: 48px;
overflow: hidden;
width: 48px;
}
.post-wrapper .post-board-photo:nth-child(n+8) {
border-left: 2px solid #fff;
border-right: 3px solid #fff;
}
.post-wrapper .post-board-photo:nth-child(10) {
border-right: none;
}
.post-wrapper .post-likes {
border-top: 1px solid #eee;
padding-top: 10px;
}
.post-wrapper .post-likes-wrapper {
margin: 0 25px 5px 25px;
}
.post-wrapper .post-likes-wrapper h4 {
float: left;
font-size: 1.1em;
margin-top: 12px;
}
.post-wrapper .post-likes-wrapper a {
display: inline-block;
margin: 0 0 6px 6px;
}
.post-wrapper .post-likes-wrapper .more-likes {
margin-left: 7px;
}
.post-wrapper .post-meta-top {
margin: 0 25px;
padding: 5px 0 15px 0;
}
.post-wrapper .post-likes-avatar {
margin-left: 55px;
}
.post-wrapper #post-repins {
border-top: 1px solid #eee;
padding: 10px 0;
}
.post-wrapper .post-repins-wrapper {
margin: 0 25px 5px 25px;
}
.post-wrapper .post-repins-wrapper h4 {
float: left;
font-size: 1.1em;
margin-top: 12px;
}
.post-wrapper .post-repins-wrapper ul {
list-style-type: none;
margin-left: 62px;
}
.post-wrapper .post-repins-wrapper li {
margin-bottom: 6px;
min-height: 50px;
}
.post-wrapper .post-repins-wrapper li.more-repins {
min-height: 1em;
}
.post-wrapper .post-repins-wrapper .post-repins-content {
line-height: 1.1em;
margin-left: 55px;
padding-top: 15px;
}
.post-wrapper .post-repins-wrapper a {
font-weight: bold;
}
.post-wrapper .post-repins-avatar {
margin-right: 4px;
}
.thetags {
margin-top: 6px;
padding: 0;
}
.thetags a {
border: 1px solid #e1e1e8;
display: inline-block;
margin-bottom: 5px;
max-width: 90%;
padding: 2px 5px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.thetags a:hover {
background: #fcfcfc;
text-decoration: none;
}
#post-repin-box {
background: #f2f2f2;
left: 50%;
margin-left: -210px;
max-width: 420px;
position: absolute;
}
#post-repin-box .close {
margin: 3px 8px 0 0;
}
#post-repin-box .post-repin-box-photo {
background: #e1e1e1;
border: 1px solid #aaa;
margin: 5px 25px;
overflow: hidden;
text-align: center;
}
#post-repin-box .post-repin-box-photo img {
max-height: 300px;
}
#post-repin-box #repinform {
margin: 10px 25px 10px 25px;
}
#post-repin-box .input-prepend, #post-repin-box .input-append {
margin: 0 0 3px 0;
width: 100%;
}
#post-repin-box .add-on {
background-color: #fcfcfc;
color: #999;
font-size: 18px;
font-weight: bold;
height: 22px;
line-height: 22px;
margin: 3px -1px 0 -1px;
width: 13%;
}
#post-repin-box .input-prepend input, #post-repin-box .input-append input {
font-size: 18px;
height: 32px;
margin: 3px 0;
text-align: left;
width: 84%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#post-repin-box .input-append input {
text-align: right;
}
#post-repin-box #repinform select {
font-size: 18px;
height: 32px;
margin: 3px 0 6px 0;
width: 65%;
background: rgb(252,252,252);
background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(241,241,241,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(241,241,241,1)));
background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(241,241,241,1) 100%);
background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(241,241,241,1) 100%);
background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(241,241,241,1) 100%);
background: linear-gradient(to bottom, rgba(252,252,252,1) 0%,rgba(241,241,241,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#f1f1f1',GradientType=0 );
}
#post-repin-box #repinform #noboard select {
color: #999;
}
#post-repin-box #repinform #repinform-add-new-board {
margin-top: 3px;
padding: 6px 10px;
}
#post-repin-box #repinform #board-add-new {
display: none;
font-size: 18px;
font-weight: bold;
height: 21px;
margin: 5px 0 5px 0;
width: 61%;
}
#post-repin-box #repinform textarea {
font-size: 18px;
height: 4em;
resize: vertical;
text-align: center;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#post-repin-box #repinform #pinit {
font-size: 1.2em;
font-weight: bold;
margin: 5px 0;
}
#post-repin-box #repinform .alert {
height: 18px;
}
#post-repin-box #repinnedmsg {
margin: 0 25px 15px 25px;
}
#post-zoom-overlay {
background: #000;
bottom: 0;
display: none;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 1055;
opacity: 0.85;
filter: alpha(opacity=85);
}
#post-embed-overlay {
background: #fff;
bottom: 0;
display: none;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 1055;
opacity: 0.92;
filter: alpha(opacity=92);
}
#post-embed-box {
z-index: 1060;
}
#post-embed-box .modal-footer {
text-align: left;
}
#post-embed-box .modal-footer .help-inline {
color: #aaa;
font-size: 1.3em;
margin-top: -10px;
}
#post-embed-box input {
font-size: 1.3em;
padding: 10px;
}
#post-embed-box .modal-footer textarea {
background-color: #f5f5f5;
font-size: 1.3em;
line-height: 1.2em;
height: 6em;
padding: 10px;
resize: none;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#post-email-overlay, #post-email-board-overlay {
background: #fff;
bottom: 0;
display: none;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 1055;
opacity: 0.92;
filter: alpha(opacity=92);
}
#post-email-box, #post-email-board-box {
z-index: 1060;
}
#post-email-box .modal-footer, #post-email-board-box .modal-footer {
text-align: left;
}
#post-email-box .modal-footer .help-inline, #post-email-board-box .modal-footer .help-inline {
color: #aaa;
font-size: 1.3em;
margin-top: -10px;
}
#post-email-box input, #post-email-board-box input {
font-size: 1.3em;
padding: 10px;
}
#post-email-box .modal-footer textarea, #post-email-board-box .modal-footer textarea {
font-size: 1.3em;
line-height: 1.2em;
height: 6em;
padding: 10px;
resize: none;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#post-report-overlay {
background: #fff;
bottom: 0;
display: none;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 1055;
opacity: 0.92;
filter: alpha(opacity=92);
}
#post-report-box {
z-index: 1060;
}
#post-report-box .modal-footer {
text-align: left;
}
#post-report-box .modal-footer .help-inline {
color: #aaa;
font-size: 1.3em;
margin-top: -10px;
}
#post-report-box input {
font-size: 1.3em;
padding: 10px;
}
#post-report-box .modal-footer textarea {
font-size: 1.3em;
line-height: 1.2em;
height: 6em;
padding: 10px;
resize: none;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.subpage-title h1 {
font-size: 1.8em;
line-height: 1.2em;
padding-bottom: 0.6em;
margin-bottom: 5px;
text-align: center;
-webkit-text-shadow: 1px 1px #fff;
-moz-text-shadow: 1px 1px #fff;
text-shadow: 1px 1px #fff;
}
.subpage-title p {
border-top: 3px double #ccc;
padding: 8px 0;
text-align: center;
}
.grand-title-wrapper {
margin: 30px 0 60px 0;
text-align: center;
}
.grand-title-wrapper h1 {
border-bottom: 3px double #ccc;
font-size: 1.8em;
line-height: 1.2em;
padding-bottom: 0.6em;
margin-bottom: 5px;
-webkit-text-shadow: 1px 1px #fff;
-moz-text-shadow: 1px 1px #fff;
text-shadow: 1px 1px #fff;
}
.grand-title-wrapper h1 a {
font-weight: bold;
}
.grand-title-wrapper .grand-title-subheader {
border-bottom: 3px double #ccc;
padding: 4px 0 8px 0;
}
.grand-title-wrapper .grand-title-subheader .avatar {
height: 32px;
width: 32px;
}
.grand-title-wrapper .grand-title-subheader a {
color: #000;
font-weight: bold;
}
.grand-title-wrapper .grand-title-subheader .pull-left a {
margin-right: 5px;
}
.grand-title-wrapper .follow {
color: #000;
font-weight: bold;
}
/* Comments */
.post-comments .commentlist {
list-style-type: none;
margin: 0;
padding: 0;
}
.post-comments .commentlist li {
list-style: none;
padding-bottom: 1em;
}
.post-comments .commentlist ul.children li {
margin: 1em 0 0 0;
padding: 0;
}
.post-comments .comment-avatar {
float: left;
padding: 3px 10px 0 0;
}
.post-comments .comment .pull-right a {
padding: 2px 6px;
font-size: 0.8em;
line-height: 15px;
color: #888;
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #e6e6e6;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
border: 1px solid #ddd;
*border: 0;
border-bottom-color: #ccc;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
*margin-left: .3em;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.post-comments .comment .pull-right a:hover {
background-color: #e6e6e6;
*background-color: #d9d9d9;
background-position: 0 -15px;
text-decoration: none;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
.post-comments .comment-content {
color: #333;
line-height: 1.3em;
margin-left: 60px;
padding-bottom: 5px;
width: 80%;
}
.post-comments span.bypostauthor a.url {
background-color: #aaa;
color: #fff;
margin-right: 5px;
padding: 0 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.post-comments span.bypostauthor a.url:hover {
background-color: #990000;
text-decoration: none;
}
.post-comments #reply-title {
color: #666;
font-size: 18px;
margin: 0;
padding: 0;
}
.post-comments #cancel-comment-reply-link {
margin-left: 60px;
}
.post-comments blockquote p {
font-size: 1em;
}
#commentform .commentform-input {
color: #666;
margin-right: 14px;
width: 31%;
}
#commentform .commentform-input:nth-child(3) {
margin-right: 0;
}
#commentform .commentform-field {
width: 94%;
}
#commentform .textarea-wrapper {
margin-left: 60px;
}
#commentform textarea {
background: #fafafa;
height: 48px;
resize: vertical;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* Media Queries */
#media (min-width: 1200px) {
#post-lightbox .post-wrapper {
width: 570px;
}
#commentform .commentform-input {
margin-right: 10px;
width: 32%;
}
.sidebar .sidebar-left-single {
width: 270px;
}
.sidebar-right-single {
margin-left: 5px;
}
.board-mini {
width: 270px;
}
.board-mini .board-photo-wrapper {
height: 65.5px;
width: 65.5px;
}
.board-domain .board-domain-wrapper {
height: 55px;
width: 55px;
}
.post-wrapper .post-share {
margin-left: 320px;
}
.usercp-pins #pin-upload-postdata-wrapper form .input-prepend input, .usercp-pins #pin-upload-postdata-wrapper form .input-append input {
width: 85%;
}
}
#media (max-width: 979px) {
body {
padding-top: 0;
}
#post-lightbox .post-wrapper {
width: 460px;
}
.sidebar {
padding-top:0;
}
.sidebar .sidebar-left-single {
width: 166px;
}
.board-mini {
width: 166px;
}
.board-mini .board-photo-wrapper {
height: 39.5px;
width: 39.5px;
}
.board-domain .board-domain-wrapper {
height: 29px;
width: 29px;
}
.post-wrapper .post-share {
margin-left: 260px;
}
.post-top-meta .pull-right {
clear:both;
float: none;
padding-top: 10px;
}
#double-left-column {
padding-bottom: 20px;
}
#scrolltotop {
right: 5px
}
#scrolltotop a {
padding: 5px 10px;
}
#commentform .commentform-input {
margin-right: 14px;
width: 100%;
}
#commentform .commentform-field {
width: 98%;
}
}
#media (min-width: 768px) and (max-width: 979px) {
#pin-postdata-add-new-board {
float: left;
}
}
#media (max-width: 767px) {
.sidebar .sidebar-left-single, .post-share {
display: none;
}
.sidebar-right-single {
margin-top: 0;
margin-left: 0;
}
.post-wrapper .post-board {
display: block;
}
.post-wrapper {
margin-bottom: 5px;
}
.board-mini {
width: 166px;
}
#userbar .nav {
display: block;
}
.usercp-pins #pin-upload-postdata-wrapper form .input-prepend input, .usercp-pins #pin-upload-postdata-wrapper form .input-append input {
width: 85%;
}
}
#media (max-width: 480px) {
#shadowtop { margin-top: -5px;
}
#masonry .thumb {
width: 93%;
}
#masonry .featured-thumb {
height: auto !important;
width: 100% !important;
}
#masonry .masonry-actionbar-mobile {
display: block;
margin-bottom: 5px;
text-align: center;
}
#post-repin-box {
margin-left: 0;
max-width: 100%;
top: 10px;
left: 10px;
right: 10px;
}
#post-repin-box select {
max-width: 50%;
}
#post-repin-box .post-repin-box-photo img {
max-height: 150px;
}
.post-wrapper .post-board-photo:nth-child(n+8) {
border-left: none;
border-right: 4px solid #fff;
}
.post-wrapper .post-board-photo:nth-child(10) {
border-right: none;
}
.post-wrapper .post-top-wrapper-header .follow {
margin-top: -40px;
}
.post-wrapper .post-top-wrapper-header {
clear: both;
margin: 50px 0 0 0;
}
.board-mini {
width: 88%;
}
.board-mini .board-photo-wrapper {
height: auto;
min-height: 35px;
width: 24.5%;
}
#user-profile-follow .follow-wrapper {
margin: 10px 0;
width: 90%;
}
}
#media (max-width: 480px) and (orientation:landscape) {
#masonry .thumb {
margin-left: 13px;
margin-right: 13px;
}
#shadowtop { margin-top: -2px;
}
it was a Google Web fonts plugin that caused it. I disabled the plugin and the problem went away.
this is from the HTML source code:
p {
margin-top: 269px; margin-bottom: 188px;
}
This is so frustrating because at one point it was working and now it isn't. I have social networking buttons at the bottom of a site i am using. I am using a background image so when the user hovers over a button it changes from the black and white image to the color version. This was working before and i don't remember changing anything but now it doesn't work and it's really frustrating.
Here is my HTML
<!-- SOCIAL NETWORKING -->
<div class="sn">
<div class="fb">
</div>
<div class="tw">
</div>
<div class="in">
</div>
</div>
And my CSS
.footwrap {
width: 100%;
height: 100px;
background-color: #444;
}
.footer {
display: block;
width: 1100px;
margin: auto;
height: 100px;
background-color: #444;
position: relative;
bottom: 0px;
}
.comm {
width: 1050px;
margin: auto;
height: 100px;
font-size: 10px;
margin-top: 20px;
text-align: center;
}
.sn {
width: 120px;
float: right;
margin-top: 40px;
margin-right: 0px;
display: inline-block;
}
.fb {
width: 20px;
height: 20px;
display: inline-block;
}
.fb a {
display: block;
width: 20px;
height: 20px;
background-image: url(images/snicons2.jpg);
background-position: 0px 0px;
}
.fb a:hover {
background-position: 0px 20px;
}
.tw {
width: 20px;
height: 20px;
display: inline-block;
padding-left: 10px;
}
.tw a {
display: block;
width: 20px;
height: 20px;
background-image: url(images/snicons2.jpg);
background-position: 40px 0px;
}
.tw a:hover {
background-position: 40px 20px;
}
.in {
width: 20px;
height: 20px;
display: inline-block;
padding-left: 10px;
}
.in a {
display: block;
width: 20px;
height: 20px;
background-image: url(images/snicons2.jpg);
background-position: 20px 0px;
}
.in a:hover {
background-position: 20px 20px;
}
I added in the .footwrap and .footer classes because they would apply to the social networking buttons although I believe they have no effect. But just in case I missed something...
ALSO!!! not only does the background not change on hover but it's like there isn't even a link there.
don't use display:block/inline/inline-block
combine the background and position into one line, it's better
use margin, not padding.
add full url into the hover images
add height and width into the hover images
add the image to the div, not the a
use negative numbers, not positive numbers.
make sure the image at http://yoursite.com/images/snicons2.jpg - if not, then update the URL accordingly.
I can't test to see if it's working because you need to post the full URL to the sprite.
But here is my suggested solution:
Thanks for giving the full URL to the image. Here is the solution:
.footwrap {
width: 100%;
height: 100px;
background-color: #444;
}
.footer {
display: block;
width: 1100px;
margin: auto;
height: 100px;
background-color: #444;
position: relative;
bottom: 0px;
}
.comm {
width: 1050px;
margin: auto;
height: 100px;
font-size: 10px;
margin-top: 20px;
text-align: center;
}
.sn {
width: 120px;
float: right;
margin-top: 40px;
margin-right: 0px;
}
.fb {
margin-left: 10px;
float: left;
width: 20px;
height: 20px;
background: url(http://thewolv.es/Website/images/snIcons2.jpg) 0px 0px no-repeat;
}
.fb:hover {
width: 20px;
height: 20px;
background: url(http://thewolv.es/Website/images/snicons2.jpg) 0px -20px no-repeat;
}
.tw {
margin-left: 10px;
float: left;
width: 20px;
height: 20px;
background: url(http://thewolv.es/Website/images/snicons2.jpg) -40px 0px no-repeat;
}
.tw:hover {
width: 20px;
height: 20px;
background: url(http://thewolv.es/Website/images/snicons2.jpg) -40px -20px no-repeat;
}
.in {
margin-left: 10px;
float: left;
width: 20px;
height: 20px;
background: url(http://thewolv.es/Website/images/snicons2.jpg) -20px 0px no-repeat;
}
.in:hover {
width: 20px;
height: 20px;
background: url(http://thewolv.es/Website/images/snicons2.jpg) -20px -20px no-repeat;
}
In jsbin:
Displayed vertically:
http://jsbin.com/EburEdu/1/
Displayed horizontally:
http://jsbin.com/UviHozE/1/
FOR YOU - REPLACEMENT STYLE.CSS FOR YOUR SITE:
(because you said it's not working, I updated your entire style.css stylesheet. The code above works perfectly, I just needed to make some other changes for your specific site that won't affect other people looking for a solution):
html {
height: 100%;
border: none;
}
body {
margin: 0;
padding: 0;
min-width: 1100px;
height: 100%;
overflow: scroll;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(top, #FAFAFA 0%, #DDDDDD 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(top, #FAFAFA 0%, #DDDDDD 100%);
/* Opera */
background-image: -o-linear-gradient(top, #FAFAFA 0%, #DDDDDD 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #FAFAFA), color-stop(1, #DDDDDD));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(top, #FAFAFA 0%, #DDDDDD 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to bottom, #FAFAFA 0%, #DDDDDD 100%);
background-attachment: fixed;
}
h1 {
color: #ED1C24;
font-weight: 700;
font-size: 38px;
line-height: 110%;
letter-spacing: -0.02em;
margin-top: 60px;
}
h2 {
color: #222222;
font-weight: 400;
font-size: 16px;
line-height: 70%;
margin-top: -12px;
}
.color {
color: #ED1C24;
}
.subtext a {
text-decoration: none;
color: #FFFFFF;
}
/*Header*/
#mobilenav {
display: none;
}
.header {
width: 100%;
height: 75px;
position: fixed;
display: block;
top: 0px;
z-index: 1000;
background-color: #Fff;
-webkit-box-shadow: 0px 1px 5px 0px #9a9a9a;
-moz-box-shadow: 0px 1px 5px 0px #9a9a9a;
box-shadow: 0px 1px 5px 0px #9a9a9a;
}
.headwrap {
width: 1050px;
margin: auto;
margin-top: 13px;
min-width: 1100px;
}
.nav {
width: 750px;
float: right;
color: #000;
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
text-decoration: none;
margin-top: 8px;
margin-right: 20px;
display: inline-block;
}
.nav ul {
list-style: none;
float: right;
}
.nav li {
float: left;
padding-left: 20px;
}
.nav li a {
color: #000;
padding-left: 40px;
text-decoration: none;
}
.nav li a:hover {
text-decoration: underline;
}
.nav li a:visited {
}
/*Content*/
.pagewrap {
display: block;
width: 1100px;
margin: auto;
margin-top: 0px;
position: relative;
padding-bottom: 50px;
}
.content p {
color: #222222;
line-height: 140%;
font-weight: 300;
font-size: 24px;
margin-top: -18px;
font-family: 'Roboto', sans-serif;
}
.intro {
text-align: left;
width: 1050px;
margin: auto;
font-family: 'Oswald', sans-serif;
font-weight: 700;
}
.intro h1 {
font-size: 32px;
}
.intro p {
font-size: 20px;
}
.slider-wrapper {
padding-top: 150px;
}
section {
width: 650px;
margin-left: 50px;
}
.one {
margin-top: 150px;
}
section h1 {
padding-top: 75px;
font-size: 45px;
font-weight: 300;
}
hr {
width: 300px;
height: 1px;
background-color: #000;
border: none;
}
.one p, .two p {
font-size: 12px;
text-align: left;
vertical-align: top;
}
.two {
margin-top: -60px;
}
article {
padding-top: 15px;
font-size: 12px;
font-weight: 400;
margin: 30px;
width: 604px;
font-family: helvetica, sans-serif;
}
.panel {
width: 300px;
margin-top: 50px;
margin-left: 33px;
float: left;
height: 150px;
background-color: #fafafa;
border-bottom-width: 35px;
border-bottom-style: solid;
-webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
-moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
box-shadow: 0px 1px 5px 0px #4a4a4a;
color: #000;
font-weight: normal;
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
line-height: 150%;
letter-spacing: normal;
}
.panel h1 {
font-size: 14px;
color: #DD282E;
font-weight: bold;
padding-top: 0px;
margin-top: 0px;
line-height: 150%;
height: 21px;
}
.panel .text {
padding: 10px;
height: 104px;
}
.panel-wrapper {
height: 150px;
width: 966px;
margin: auto;
font-size: 1em;
}
.panel .subtext {
margin-top: 35px;
text-align: right;
padding-right: 10px;
color: #ffffff;
vertical-align: center;
font-size: 1em;
}
.button, .button2 {
float: right;
}
#controls {
float: right;
margin-top: -60px;
}
#slider {
-webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
-moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
box-shadow: 0px 1px 5px 0px #4a4a4a;
}
article h1 {
font-size: 26px;
color: #DD282E;
font-weight: bold;
padding-top: 0px;
margin-top: 0px;
line-height: 150%;
}
/*Sidebar*/
#sidebar {
width: 220px;
float: right;
margin-right: 88px;
margin-top: 150px;
color: #222222;
line-height: 140%;
font-weight: 400;
font-size: 14px;
font-family: 'Roboto', sans-serif;
}
#sidenav {
height: 100px;
width: 200px;
background-color: #FFFFFF;
padding: 10px;
-webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
-moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
box-shadow: 0px 1px 5px 0px #4a4a4a;
}
#sidenav li {
list-style: inside;
}
#links {
width: 200px;
margin-top: 30px;
background-color: #FFFFFF;
padding: 10px;
-webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
-moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
box-shadow: 0px 1px 5px 0px #4a4a4a;
}
#documents {
width: 200px;
margin-top: 30px;
background-color: #FFFFFF;
padding: 10px;
-webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
-moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
box-shadow: 0px 1px 5px 0px #4a4a4a;
}
#news {
width: 330px;
background-color: #FFFFFF;
padding: 10px;
margin: auto;
margin-top: 0px;
}
#news p {
margin-top: 0px;
}
#sidebar ul {
list-style: none;
margin-left: -25px;
}
#sidebar li {
font-size: 12px;
font-weight: 400;
text-align: left;
}
#sidebar a, #sidebar a:visited {
text-decoration: none;
color: #39F;
}
#sidebar a:hover, #sidbar a:active {
text-decoration: underline;
color: #36F;
}
/*Footer*/
.footwrap {
width: 100% !important;
height: 100px !important;
background-color: #444 !important;
}
.footer {
display: block !important;
width: 1100px !important;
margin: 30px auto !important;
height: 100px !important;
background-color: #444 !important;
position: relative !important;
bottom: 0px !important;
font: 14px arial !important;
color: #fff !important;
padding: 20px !important;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.comm {
width: 1050px !important;
margin: auto !important;
height: 100px !important;
font-size: 10px !important;
margin-top: 20px !important;
text-align: center !important;
}
.sn {
width: 120px !important;
float: right !important;
margin-top: -100px !important;
margin-right: 0px !important;
}
.fb {
margin-left: 10px !important;
float: left !important;
width: 20px !important;
height: 20px !important;
background: url(http://thewolv.es/Website/images/snIcons2.jpg) 0px 0px no-repeat !important;
}
.fb:hover {
width: 20px !important;
height: 20px !important;
background: url(http://thewolv.es/Website/images/snicons2.jpg) 0px -20px no-repeat !important;
}
.tw {
margin-left: 10px !important;
float: left !important;
width: 20px !important;
height: 20px !important;
background: url(http://thewolv.es/Website/images/snicons2.jpg) -40px 0px no-repeat !important;
}
.tw:hover {
width: 20px !important;
height: 20px !important;
background: url(http://thewolv.es/Website/images/snicons2.jpg) -40px -20px no-repeat !important;
}
.in {
margin-left: 10px !important;
float: left !important;
width: 20px !important;
height: 20px !important;
background: url(http://thewolv.es/Website/images/snicons2.jpg) -20px 0px no-repeat !important;
}
.in:hover {
width: 20px !important;
height: 20px !important;
background: url(http://thewolv.es/Website/images/snicons2.jpg) -20px -20px no-repeat !important;
}
(Your website fully cloned in jsbin with the fully working sprites: http://jsbin.com/OTeMuX/1)
I dont think setting background image on hover helps.
Is the image accessible in the first place.
Can you check that by going the image URL.
If your page URL is http://your.domain/abc/def.html
Then the image should be at http://your.domain/abc/images/snicons2.jpg
I modified your code because I, like the rest of SO, didn't have the image to work with. But this works fine.
CSS
.footwrap {
width: 100%;
height: 100px;
background-color: #444;
}
.footer {
display: block;
width: 1100px;
margin: auto;
height: 100px;
background-color: #444;
position: relative;
bottom: 0px;
}
.comm {
width: 1050px;
margin: auto;
height: 100px;
font-size: 10px;
margin-top: 20px;
text-align: center;
}
.sn {
width: 120px;
float: right;
margin-top: 40px;
margin-right: 0px;
display: inline-block;
}
.fb {
width: 20px;
height: 20px;
display: inline-block;
}
.fb a {
display: block;
width: 20px;
height: 20px;
background-image: url(fbo.jpg);
background-position: 0px 0px;
}
.fb a:hover {
background-position: 0px 20px;
background-image: url(fbi.jpg);\\haha, fbi...
}
.tw {
width: 20px;
height: 20px;
display: inline-block;
padding-left: 10px;
}
.tw a {
display: block;
width: 20px;
height: 20px;
background-image: url(two.jpg);
background-position: 40px 0px;
}
.tw a:hover {
background-position: 40px 20px;
background-image: url(twi.jpg);
}
.in {
width: 20px;
height: 20px;
display: inline-block;
padding-left: 10px;
}
.in a {
display: block;
width: 20px;
height: 20px;
background-image: url(ino.jpg);
background-position: 20px 0px;
}
.in a:hover {
background-position: 20px 20px;
background-image: url(ini.jpg);
}
HTML
<body>
<div class="sn">
<div class="fb">
</div>
<div class="tw">
</div>
<div class="in">
</div>
</div>
</body>
EDIT I didn't explain why... You should act as though the anchors are what you are modifying and that the divs are just containers for those anchors. Your a:hover had just background positioning. Unless that's what you were going for. In that case, ignore me.