Looks fine in firefox but the image is not displaying in center.
In Chrome image is not aligned in the center of browser window
If you refresh the browser it get aligned to center & then get back to left after few second.
thank you for any help.
here is the Demo Template.
Thx.
css code:
html,body {
margin: 0;
padding: 0;
text-align: center;
font-family: arial, Helvetica, sans-serif;
font-size: 14px;
/*background: #FFF url("images/border.jpg") repeat-y center;*/
}
#wrapper{
margin:0 30px;
width: 95%;
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.4);
}
#anti-shadow-div{
display:table;
overflow:hidden;
}
img { border: none; }
a { text-decoration: none; color: #2965a6; font-weight: bold;}
a:hover { text-decoration: underline; color: #fca00e; }
/*---------- Divs ----------*/
/*#header {
background: url("images/logo006.jpg") no-repeat center;
height: 120px;
width: 100%;
margin: 0 auto;
}*/
#header001 {
background: url("images/logo001.jpg") no-repeat center top;width:890px;height:133px;
height: 133px;
width: 900px;
margin: 0 auto;
font-family: arial, Helvetica, sans-serif;
font-size: 50px;
}
#indexheader{
background:#FFFFFF;
height: 30px;
width: 890px;
margin: 0 auto;
font-family: arial, Helvetica, sans-serif;
font-size: 50px;
}
#indeximg{
float:left;
}
#navibtn{
width:900px;
height:90px;
margin: 0 auto;
}
.navibtn001{
background:url(images/automart.jpg) no-repeat;
width:200px;
height:90px;
}
.navibtn002{
background:url(images/cab.jpg) no-repeat;
width:900px;
height:90px;
}
#logo002{
padding-top: 30px;
margin: 0 auto;
width: 890px;
voice-family: "\"}\"";
voice-family:inherit;
width: 850px;
}
/************
html>body #logo { width: 850px } /* for opera */
/*
#logo a:hover {
text-decoration: none;
} */
/*
#logo a {
float: left;
background: url("images/logo.jpg") no-repeat 0px 0px;
width: 317px;
height: 85px;
}
*******************/
/*---------- Divs ----------*/
#flsh{
background:url(images/vans/56%20dolpin/flv002.swf) no-repeat left top;width:640px;height:480px;
height: 500px;
width: 650px;
margin: 0 auto;
}
/*******************/
#menubutton{
width:100%;
height:20px;
text-align:center;
}
#container {
width: 100%;
overflow: hidden;
text-align: left;
font: 90% Tahoma, Helvetica, sans-serif;
margin: 0px auto;
border-top: 3px solid #6fb2e6;
border-bottom: 3px solid #ffb93f;
background: #e5e5e5;
}
* html #container {
overflow: visible;
}
#content{
float: right;
width: 690px;
background: #fff url(images/nav-edge.jpg) repeat-y;
padding-bottom: 40px;
min-height: 380px;
}
* html #content {height: 380px; overflow: visible;}
#maincontent {
float: left;
float: right;
padding: 30px 20px 0px 20px;
overflow: hidden;
width: 450px;
voice-family: "\"}\"";
voice-family:inherit;
width: 410px;
}
#maincontent001 {
float: left;
/* float: right;*/
padding: 30px 20px 0px 20px;
overflow: hidden;
width: 450px;
voice-family: "\"}\"";
voice-family:inherit;
width: 650px;
}
#rightdiv{
padding-top: 30px;
float: right;
width: 230px;
}
#rightdiv img{
padding: 1px;
border: 1px solid #6fb2e6;
}
#news{
width: 210px;
margin: 0 auto;
}
/*---------- Navigation Menu ----------*/
#navcontainer {
padding-top: 30px;
padding-left: 15px;
min-height: 380px;
float: left;
overflow: hidden;
width: 180px;
}
* html #navcontainer {height: 380px; overflow: visible;}
.nav {
width: 170px;
position:absolute;
list-style-type: none;
margin: 0;
padding: 0px;
font-size: 105%;
left: 228px;
top: 13px;
}
.nav li {
text-align: left;
margin: 3px 1px;
padding: 0;
}
.nav li a {
border: 1px solid #52a3e2;
display: block;
padding: 4px 0 4px 10px;
background: #6fb2e6;
color: #e5ffff;
font-weight: bold;
text-decoration: none;
width: 170px;
voice-family: "\"}\"";
voice-family:inherit;
width: 160px;
}
.nav li a:hover {
background: #ffb93f;
color: #949494;
font-weight: bold;
cursor: pointer;
}
/*---------- Footer ----------*/
#footer {
height: 30px;
margin: 0 auto;
padding: 10px 0 10px 0;
font-size: 80%;
text-align: center;
color: #6a6666;
width: 890px;
background: #fff;
}
#footerimg{
background:url("images/footer.jpg") no-repeat left top;width:890px;height:133px;
height: 133px;
width: 900px;
margin: 0 auto;
}
#footeradd{
background:url(images/carsalelogo.jpg)no-repeat left top;width:890px;height:133px;
height: 133px;
width: 900px;
margin: 0 auto;
}
#footertextleft{
margin-left: 10px;
text-align: left;
width: 450px;
float: left;
}
#footertextright{
margin-right: 10px;
text-align: right;
width: 350px;
float: right;
}
/*---------- Headings ----------*/
h1 {
padding-top: 0;
margin-top: 0;
font: 120% Arial;
font-weight: bold;
color: #5c94bf;
}
.mainheading{
font-weight: bold;
font-size: 123%;
}
h2 {
padding-top: 0px;
margin-top: 0px;
font: 110% arial;
font-weight: bold;
color: #5c94bf;
}
#subtext{
padding-top: 0px;
margin-top: 0px;
font: 110% arial;
font-weight: bold;
color: #5c94bf;
}
/*---------- Classes ----------*/
.underline{
padding-bottom: 3px;
width: 180px;
border-bottom: 2px solid #ffb93f;
}
.subheading{
font-weight: bold;
}
.submitbox{
width: 215px;
background: #b8d1e4;
padding: 5px;
text-align: left;
border: 1px solid #e5e5e5;
}
.submitbox p{
margin-top: 3px;
margin-bottom: 5px;
}
.submitbox button{
font-size: 95%;
background: #e5e5e5;
color: #949494;
border: none;
padding: 3px 8px;
font-weight: bold;
}
#maincontent ul{
list-style-image: url(images/bullet.png)
}
.advert{
width: 160px;
padding: 5px;
background: #fff;
border: 1px solid #c8c8c8;
}
add margin: 0 auto; to :
#anti-shadow-div {
display: table;
overflow: hidden;
margin: 0 auto;
}
Related
Update:
I'm sure this will be easy fix for advanced members. I have created drop down menu with the 'nav' element. For some reason as hard as I try, I cannot get the menu to overlap the slider images below it when you expand it on mobile. I've tried lowering the Z-index on the slider and raising it on the menu. What am I doing wrong? Thanks in advance:
UPDATE: Here is a fiddle link as requested by a comment which includes the HTML. https://jsfiddle.net/wknow6cv/#&togetherjs=ADxkd31O6q
#import 'https://fonts.googleapis.com/css?family=Alegreya+Sans';
* {
margin: 0;
padding: 0;
border: 0;
overflow-x: hidden;
}
html,body
{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
body {
background: #F5F5F5;
color: #67727A;
font-family: 'Alegreya', Sans-serrif;
margin: 0;
}
h3 {
font-size: 150%;
line-height: 155%;
padding: 5% 0;
font-weight: 400;
}
p{
font-size: 120%;
line-height: 150%;
padding: 3%;
text-indent: 2%;
text-align: center;
}
img{
max-width: 100%;
height: auto;
width: auto;
margin-bottom: -4px;
}
header{
background-color: #6991AC;
width: 100%;
height: 120px;
}
h1{
position:absolute;
right: 600px;
top:30px;
}
#top-left-menu {
right: 0px;
}
#logo{
margin: 20px;
float: left;
width: 380px;
height: 60px;
background: url(img/RD.png) no-repeat center;
left: 0px;
top: 0px;
}
p {
font-size: 1.4vw;
}
h3{
font-size: 1.5vw;
}
/*--- Start Navigation --*/
nav{
float: right;
padding: 25px 20px 0 0; /*--top right bottom left--*/
}
#menu-icon{
display: hidden;
width: 40px;
height: 40px;
background: url(img/nav.png) center;
}
a:hover#menu-icon {
border-radius: 4px 4px 0 0;
}
ul{
list-style-type: none;
}
nav ul li {
font-family: 'Alegreya Sans', Sans-serrif;
font-size: 150%;
display: inline-block;
/*makes the links go left from right instead of up and down*/
float: left;
padding: 10px;
}
nav ul li a {
text-decoration: none;
color: #F5F5F5;
}
nav ul li a:hover {
color: #C3D7DF;
}
/*.current{
color: #C3D7DF;
}
/*--End Navigation--*/
.one-fourth {
width: 25%;
float: left;
text-align: center;
font-family: Arial;
color: #F0F0F0;
}
#cloud {
background-color: #C3D7DF;
}
#lock {
background-color: #6991AC;
}
#headset {
background-color: #C3D7DF;
}
#truck {
background-color: #6991AC;
}
.one-fourth i { /*--Icons at one fourth blocks--*/
color: #F0F0F0;
font-size: 410%;
padding: 13% 0 4% 0;
}
article {
float: left;
margin: 0 auto;
width: 50%;
height: auto;
}
#sec-1 {
background-color: #FFFFFF;
}
aside {
float: right;
margin: 0 auto;
width: 50%;
height: auto;
}
.one-third {
width: 33.3333333%;
float: left;
text-align: center;
color: #FFFFFF
}
#google{
background-color: #A2B1C1;
}
#marketing {
background-color: #BEB9AD;
}
#customers {
background-color: #AADCD2;
}
/*--Start Footer--*/
footer {
background-color: #4682B4;
width: 100%;
}
.social {
list-style-type: none;
text-align: center;
}
.social li {
display: inline;
}
.social i { /*--icons--*/
font-size: 220%;
padding: 3% 3% 3% 2%;
color: #C3D7DF;
}
.social i:hover {
color: F5F5F5;
}
footer.second { /*--Socket--*/
border-top: 1px solid #AADCD2;
background-color: #544B59;
max-height: 55px;
text-align: center;
margin: 0;
}
footer.second p {
padding: 5px 0 9px 0;
text-align: center;
}
.carouselbox {
font-family: helvetica,sans-serif;
font-size: 14px;
width: 100px;
position: relative;
margin: 1em;
border: 1px solid #ccc;
box-shadow: 2px 2px 10px #ccc;
overflow: hidden;
}
.content {
margin: 0;
padding: 0;
}
.content li {
font-size: 100px;
margin: 0;
padding: 0;
width: 100%;
list-style: none;
text-align: center;
}
.new-inner {
height: 800px;
width: 100%;
float: left;
background-color: #FFFAFA;
font-family: Arial;
}
.nip1 {
width: 40%;
}
/*---------Insert Slideshow stuff below------*/
.cycle-slideshow{
width: 100%;
display: block;
position: relative;
margin: 0 auto;
overflow: hidden;
}
.cycle-prev, .cycle-next {
font-size: 200%;
color: #FFF;
top: 50%;
display: block;
position: absolute;
z-index: 9999;
cursor: pointer;
}
.cycle-prev {left: 10%;}
.cycle-next {right: 10%}
.cycle-pager{
width: 100%;
text-align: center;
display: block;
position: absolute;
bottom: 20px;
z-index: 9999;
cursor: pointer;
}
.cycle-pager span {
text-indent: 100%;
white-space: normal;
width: 12px;
height: 12px;
display: inline-block;
border: 1px solid #FFF;
border-radius: 50%;
margin: 0 10px;
}
.cycle-pager .cycle-pager-active {background: #FFF;}
/*------------MEDIA QUERIES ARE NOW STARTING-------------*/
#media screen and (max-width: 768px){
p {
font-size: 250%;
}
h3{
font-size: 260%;
}
header{
width: 100%;
}
#logo {
margin: 15px 0 20 -25px;
background: url(img/RD_mobile.png) no-repeat center;
float: left;
width: 170px;
height: 60px;
}
#menu-icon {
display: inline-block;
}
nav ul, nav:active ul {
display: none;
z-index: 1000;
position: absolute;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}
nav:hover ul {
display: block;
}
nav li {
text-align: center;
width: 100%;
padding: 10px 0;
}
.one-fourth {
float: left;
width: 100%;
font-size: 30%;
}
.one-fourth i {
font-size: 500%;
padding: 4% 0 1% 0;
}
article {
width: 100%;
}
aside {
width: 100%;
}
.hand-mobile {
display: none;
}
.social i {
font-size: 100%;
}
}
Maybe try to change the media queries nav to position: relative;
EDIT:
Try this instead, change the display: none to inline:
nav ul, nav:active ul {
display: inline;
z-index: 1000;
position: relative;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}
Okey so when I shrink my chrome window the Nav and the Header moves with the rezising. I don´t want that. The Mainbox however stays in position? No idea why but great! I can´t really find the difference between the Nav class and the Mainbox one except the overflow: auto which didn´t help on the nav nor the header.
.container {
height: 800px;
width: 1500px;
}
body {
margin:0px;
padding:0px;
width:100%;
}
header
{
top: 11px;
width: 100%;
}
ol {
list-style-type: upper-roman;
}
.sideIMG {
position:fixed;
top: 200px;
left: 500px;
height: 100%;
float: left;
}
.sideIMGR {
position:absolute;
top: 200px;
right: 20%;
height: 100%;
float: left;
overflow: auto;
}
.mainBox
{
background-color: #F0F0F0 ;
height: 1050px;
width: 700px;
box-shadow: 10px 10px 5px #888888;
overflow: auto;
top: 310px;
padding-top: 30px;
padding-right: 50px;
padding-left: 50px;
}
.textBox
{
height: 110px;
width: 200px;
background-color:#E8E8E8;
border-style: double;
}
H1{
font-family:"Brush Script MT";
}
footer
{
box-shadow: 10px 10px 5px #888888;
border-bottom-right-radius: 20px;
border-bottom-left-radius: 20px;
top: 1360px;
height: 150px;
width: 800px;
background-color: #F0F0F0 ;
}
.container nav ul {
list-style-type: none;
}
nav
{
padding: 10px 20px 20px 20px;
padding-right: 50px;
padding-left: 50px;
box-shadow: 10px 10px 5px #888888;
width: 700px;
height:40px;
background-color: #F0F0F0;
border-color: black;
border-width: 1px;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
font-family: Georgia, "Times New Roman", Times, serif;
}
a {
color: #000;
text-decoration: none;
padding: 20px;
}
a:hover
{
color:#00A0C6;
text-decoration:none;
cursor:pointer;
}
.bildRuta
{
height: 350px;
width: 250px;
left: 500px;
top: 350px;
}
.mainBox a img {
border: medium solid #000;
border-radius: 5px;
}
.underRubrik
{`enter code here`
font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
}
HTML:
<center><header><img src="Bilder/spegel.jpg"/></header></center>
With character: http://jsfiddle.net/nuu6g/
For some reason, I cannot click on my text on my navigation menu. This is most likely due to the (missing) image on the left, which I will refer to as the "character." However, when I remove the character, I can indeed click on the text again.
Without character: http://jsfiddle.net/aN5s5/
body {
background:grey;
}
.topContainer {
width: 1000px;
height: 125px;
margin: 0 auto;
padding-bottom: 20px;
}
#logo {
float: left;
padding: 10px 10px;
}
/* Navigation */
#navigation {
background: #107AEB;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#107AEB), to(#106FEB));
background: -webkit-linear-gradient(top, #107AEB, #106FEB);
background: -moz-linear-gradient(top, #107AEB, #106FEB);
background: -ms-linear-gradient(top, #107AEB, #106FEB);
background: -o-linear-gradient(top, #107AEB, #106FEB);
border: 2px solid rgba(16, 86, 235, 0.9);
border-radius: 15px;
float: right;
width: 455px;
height: 55px;
margin-top: 22px;
z-index: 1;
}
#navigation ul {
display: inline-block;
position: absolute;
list-style-type: none;
}
#navigation li {
display: inline-block;
}
#navigation a {
color: #FFF;
font-family: SEGOEUIL, Arial, sans-serif;
text-shadow: 0 1px 0 #000;
text-align: center;
padding: 5px 10px;
font-size: 17px;
}
#navigation a:hover {
background: rgba(16, 86, 235, 0.9);
border-radius: 5px;
}
#navigation a:active {
text-decoration: none;
}
#navigation a:link {
text-decoration: none;
}
.character {
z-index: 2;
padding: 0 275px;
float: left;
position: absolute;
width: 187px;
height: 174px;
}
/* Wrapper */
#wrapper {
background: #FFF;
/*rgba(255, 255, 255, 0.85);*/
border-top-left-radius: 25px;
border-top-right-radius: 25px;
width: 1000px;
height: 1200px;
position: relative;
z-index: 3;
overflow: hidden;
margin: 0 auto;
}
#photoContent {
background: #ffcc00;
border: 1px solid #b62100;
border-radius: 8px;
width: 781px;
height: 231px;
margin-top: 12px;
display: block;
margin-left: auto;
margin-right: auto;
}
.displayPhoto {
width: 771px;
height: 221px;
border: 0;
border-radius: 8px;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 3px;
border: 1px solid #b62100;
}
#leftContent {
padding-top: 15px;
width: 500px;
height: 140px;
float: left;
padding-left: 45px;
}
.title {
font-family: Arial, sans-serif;
color: #3abfee;
font-size: 20px;
}
.desc {
color: #575757;
font-size: 15px;
font-family: Arial, sans-serif;
}
#rightContent {
padding-top: 15px;
width: 300px;
height: 140px;
float: right;
padding-right: 25px;
}
#flashContent {
padding-left: 25px;
width: 700px;
height: 500px;
}
hr {
width: 750px;
height: 1px;
background: #CCC;
border: none;
margin-top: 10px;
}
/* Bottom Wrapper */
#bwCont {
width: 1000px;
height: 500px;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
}
.galleryCont {
display: block;
margin-left: auto;
margin-right: auto;
width: 650px;
height: 150px;
}
.galleryImgCont {
width: 175px;
height: 175px;
float: left;
}
.galleryTitle {
font-family:'Exo 2', sans-serif;
font-size: 17px;
color: #333;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
padding-top: 145px;
}
.galleryDesc {
font-family:'Exo 2', sans-serif;
font-size: 15px;
color: #333;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
#galleryImg {
width: 175px;
height: 125px;
border: 5px solid #F5F5F5;
box-shadow: 0 0 7px;
border-radius: 5px;
float: left;
}
.readMore {
width: 175px;
height: 50px;
background: #000;
border: 0;
border-radius: 5px;
padding: 10px 10px;
color: #FFF;
font-family:'SEGOEUIL', sans-serif;
font-size: 17px;
}
.readMore:hover {
background: #202020;
}
Please help me, thanks! Also, just an extra question; is there any way I can keep the read more buttons inline, instead of like a staircase? Sorry, but thank you!
For your links to be "clickable", either adjust the padding/width of #character or use the following CSS so #navigation comes up top of #character
#navigation {
z-index: 3;
position: relative;
}
DEMO
For "Read More" to be aligned, you're going to need to have the same number of lines in the title and the description, or you can set a minimum height (or even just the height) of those by adding the following CSS for eaxmple:
.galleryTitle {
min-height:40px;
}
.galleryDesc {
min-height:60px;
}
DEMO
Your nav items are displaying in a staircase because there is not enough room due to the width of your ul. adding width 100% will allow them to display inline the way you want.
#navigation ul {
width: 100%
}
the reason you can't click your text link is because of your character class overlaying your images with a higher z-index.
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.
i am currently trying to move my sidebar from below the content box to the right of it alongside it. No matter what i try it stays at a certain point no going up any higher. My website is VAGUE LINES, where if you scroll down a bit u will be able to see exactly what i am saying.
Below is my css code thanks alot:
h1
{
text-align:center;
font-family:sans-serif;
letter-spacing:12px;
padding-bottom:6px;
border-top:1px solid rgb;
margin-top:35px;
color:#544E4F;
font-weight:lighter;
}
hr
{
display:overline-block;
width:200px;
}
#header
{
background: #FFFFFF;
text-align: center;
}
#navigation ul
{
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
}
#navigation ul li
{
display: inline;
padding-right: 30px;
}
#navigation ul li a
{
text-decoration: none;
padding: .3em 5em;
color: #000000;
background-color: #FFFFFF;
font-family: courier;
}
#navigation ul li a:hover
{
text-decoration: line-through;
}
.centeredImage
{
float: none;
margin: 4% 0 2% 9%;
text-align: center;
padding-bottom: 25px;
}
#main-content hr
{
width :66%;
margin-left: 9%;
}
#main-content
{
width:80%;
padding-left: 113px;
padding-top: 20px;
}
#page-wrap {
background: white;
min-width: 780px;
max-width: 1260px;
margin: 10px auto;
}
#page-wrap #inside {
margin: 10px 10px 0px 10px;
padding-top: 10px;
padding-bottom: 10px;
}
#sidebar{
border-top: 1px solid #99CC33;
border-left: 1px solid #99CC33;
height: 300px;
width: 200px;
margin-right: 5px;
padding: 5px 0 0 5px;
position:absolute;
}
#main-content p
{
margin-left: 10%;
font-family: courier;
font-size: 14px;
}
#heading p
{
margin-left: 10%;
font-family: sans-serif;
font-size: 14px;
}
#sidebar p
{
margin-left: 10%;
font-family: courier;
font-size: 14px;
font-weight:bold;
}
Try this:
#main-content
{
float: left; // float element to the left side
width:80%;
padding-left: 113px;
padding-top: 20px;
}
#sidebar{
border-top: 1px solid #99CC33;
border-left: 1px solid #99CC33;
height: 300px;
width: 200px;
margin-right: 5px;
padding: 5px 0 0 5px;
position:absolute;
right: 0; // position element to the right
}
EDIT: Sorry. You wanted sidebar on the right.