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.
Related
Here is the HTML, the thing is the nav bar on my first main page works fine but all the other pages have a gap in between the top and the nav bar, its really annoying.
* {box-sizing: border-box;}
body {
margin: 0px;
}
.purchback {
background-image: url(../IMAGES/egg.png);
background-size: auto;
background-repeat: no-repeat;
}
.aboutback {
background-image: url(../IMAGES/farm.jpg);
background-size: cover;
background-repeat: no-repeat;
}
.indexback {
background-image: url(../IMAGES/potato.jpg), url(../IMAGES/chipsf.jpg);
background-size: contain, contain;
background-repeat: no-repeat, repeat;
}
.hap {
height: 280px;
width: 300px;
}
html {
margin-top: 0;
padding: 0;
}
head{
}
h2 {
color: white;
background-color: rgba(0,0,0, 0.9);
border: solid white 3px;
display: inline-block;
padding: 5px 50px 300px 5px;
font-family: cursive;
font-weight: lighter;
margin: 0;
text-align: left;
}
p {
color: black;
vertical-align: top;
}
.logo {
height: 30px;
width: 30px;
padding:-10px -10px -10px -10px;
float: right;
}
.heading {
text-align: center;
font-family: impact;
color: white;
font-weight: lighter;
padding-right: 10px;
padding-top: 200px;
border-bottom: solid white 4px;
padding-bottom: 17px;
}
.information {
text-align: center;
color: white;
font-family: impact;
font-weight: lighter;
font-size: 20px;
padding-right: 10px;
padding-bottom: 20px;
}
.chips {
width: 400px;
height: 550px;
padding-top: 40px;
padding-left: 20px;
}
.carbless {
padding-bottom: 20px;
height: 300px;
width: 230px;
padding-top: 60px;
margin-left: -15px;
position: sticky;
}
.carbless:hover {
border: solid white 3px;
background-color: rgba(100, 0, 100, 0.5);
}
.bigg:hover {
border: solid white 3px;
background-color: rgba(100, 0, 100, 0.5);
}
.bigg {
padding-bottom: 20px;
height: 330px;
width: 250px;
padding-top: 60px;
margin-left: -9px;
position: sticky;
}
background-image {
width: 800px;
height: 500px;
background-repeat: no-repeat;
}
nav {
background-color: rgb(200,180,90);
padding: 10px;
width: 100%;
margin: 0 auto;
position: fixed;
display: block;
}
.purchase {
text-align: center;
font-family: impact;
color: white;
font-weight: lighter;
padding-right: 10px;
padding-top: 80px;
border-bottom: solid white 4px;
padding-bottom: 10px;
}
nav > ul > li {
display: inline-block;
margin-left: 11px;
color: white;
font-family: impact;
font-size: 30px;
padding: 5px 40px 5px 40px;
font-weight: lighter;
}
ul {
list-style-type: none;
}
nav > ul > li > a {
text-decoration: none;
color: white;
}
nav > ul {
margin: 0px;
padding: 0px;
}
nav > ul > li > a:hover {
color: grey;
border: -5px white solid;
}
section {
margin-left: 500px;
margin-top: -330px;
color: white;
font-family: impact;
font-weight: 600;
font-size: 55px;
}
nav > ul > li > ul {
background-color: rgb(200,180,90);
list-style: none;
padding: 0;
display: none;
position: absolute;
}
nav > ul > li:hover > ul {
display: block;
border: -5px white solid;
}
.abouttext {
margin: 10px 10px 10px 10px;
padding: 100px 0px 100px 40px;
font-family:consolas;
background-color: rgba(0, 0, 0, 0.4);
color: white;
}
nav > ul > li:hover {
border: -5px solid white;
}
footer {
color: white;
padding-top: 30px;
text-align: center;
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="CSS/master.css">
</head>
<body class="purchback">
<nav>
<ul>
<li>HOME</li>
<li>ABOUT</li>
<li>PURCHASE</li>
<li>VIDEOS</li>
<li>CONTACT</li>
<li><img class="logo"src="IMAGES/logo.png" alt="logo"></li>
</ul>
</nav>
<h1 class="purchase" style="padding-top: -30">purchase our products</h1>
</body>
</html>
And here is the CSS, sorry if it is messy/bad this is my first time making a website.
Remove margin for .purchase
.purchase {
text-align: center;
font-family: impact;
color: white;
font-weight: lighter;
padding-right: 10px;
padding-top: 80px;
border-bottom: solid white 4px;
padding-bottom: 10px;
margin:0; /*Add this*/
}
* {box-sizing: border-box;}
body {
margin: 0px;
}
.purchback {
background-image: url(../IMAGES/egg.png);
background-size: auto;
background-repeat: no-repeat;
}
.aboutback {
background-image: url(../IMAGES/farm.jpg);
background-size: cover;
background-repeat: no-repeat;
}
.indexback {
background-image: url(../IMAGES/potato.jpg), url(../IMAGES/chipsf.jpg);
background-size: contain, contain;
background-repeat: no-repeat, repeat;
}
.hap {
height: 280px;
width: 300px;
}
html {
margin-top: 0;
padding: 0;
}
head{
}
h2 {
color: white;
background-color: rgba(0,0,0, 0.9);
border: solid white 3px;
display: inline-block;
padding: 5px 50px 300px 5px;
font-family: cursive;
font-weight: lighter;
margin: 0;
text-align: left;
}
p {
color: black;
vertical-align: top;
}
.logo {
height: 30px;
width: 30px;
padding:-10px -10px -10px -10px;
float: right;
}
.heading {
text-align: center;
font-family: impact;
color: white;
font-weight: lighter;
padding-right: 10px;
padding-top: 200px;
border-bottom: solid white 4px;
padding-bottom: 17px;
}
.information {
text-align: center;
color: white;
font-family: impact;
font-weight: lighter;
font-size: 20px;
padding-right: 10px;
padding-bottom: 20px;
}
.chips {
width: 400px;
height: 550px;
padding-top: 40px;
padding-left: 20px;
}
.carbless {
padding-bottom: 20px;
height: 300px;
width: 230px;
padding-top: 60px;
margin-left: -15px;
position: sticky;
}
.carbless:hover {
border: solid white 3px;
background-color: rgba(100, 0, 100, 0.5);
}
.bigg:hover {
border: solid white 3px;
background-color: rgba(100, 0, 100, 0.5);
}
.bigg {
padding-bottom: 20px;
height: 330px;
width: 250px;
padding-top: 60px;
margin-left: -9px;
position: sticky;
}
background-image {
width: 800px;
height: 500px;
background-repeat: no-repeat;
}
nav {
background-color: rgb(200,180,90);
padding: 10px;
width: 100%;
margin: 0 auto;
position: fixed;
display: block;
}
.purchase {
text-align: center;
font-family: impact;
color: #000;
font-weight: lighter;
padding-right: 10px;
padding-top: 80px;
border-bottom: solid white 4px;
padding-bottom: 10px;
margin:0;
}
nav > ul > li {
display: inline-block;
margin-left: 11px;
color: white;
font-family: impact;
font-size: 30px;
padding: 5px 40px 5px 40px;
font-weight: lighter;
}
ul {
list-style-type: none;
}
nav > ul > li > a {
text-decoration: none;
color: white;
}
nav > ul {
margin: 0px;
padding: 0px;
}
nav > ul > li > a:hover {
color: grey;
border: -5px white solid;
}
section {
margin-left: 500px;
margin-top: -330px;
color: white;
font-family: impact;
font-weight: 600;
font-size: 55px;
}
nav > ul > li > ul {
background-color: rgb(200,180,90);
list-style: none;
padding: 0;
display: none;
position: absolute;
}
nav > ul > li:hover > ul {
display: block;
border: -5px white solid;
}
.abouttext {
margin: 10px 10px 10px 10px;
padding: 100px 0px 100px 40px;
font-family:consolas;
background-color: rgba(0, 0, 0, 0.4);
color: white;
}
nav > ul > li:hover {
border: -5px solid white;
}
footer {
color: white;
padding-top: 30px;
text-align: center;
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="CSS/master.css">
</head>
<body class="purchback">
<nav>
<ul>
<li>HOME</li>
<li>ABOUT</li>
<li>PURCHASE</li>
<li>VIDEOS</li>
<li>CONTACT</li>
<li><img class="logo"src="IMAGES/logo.png" alt="logo"></li>
</ul>
</nav>
<h1 class="purchase" style="padding-top: -30">purchase our products</h1>
</body>
</html>
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;
}
I am a newbie at this so please excuse me if this doesn't make sense. In the #topbar2 section of this CSS Style-sheet I want the image NAFF_webtracker_logo.gif to appear. I believe I need to override just this section of the document since this is inherting from defaultstyle.css. This is in an application where I cannot edit defaultstylesheet.css. Is there a way I can override just this section to get my logo to appear? My coding seems correct but the image does not display.
Any help is appreciated.
Colin
/*
This file inherits all the styles from DefaultStyle.css
Please make sure that the following import link is present if you want to inherit default styles.
Any changes in fonts, colours, layout, etc. can be done via overriding CSS style elements after the import statement.
Good CSS guide is located at
http://www.htmlhelp.com/reference/css/
*/
#import url(DefaultStyle.css);
/* put your changes below this comment */
body
{
background-image: url(images/BG.gif);
background-color: none;
background-position: left top;
background-repeat: no-repeat;
color: #666666;
padding: 0;
margin: 0;
font-size: 11px;
}
#OuterContentPane
{
padding: 15px 30px 20px 30px;
background: none;
border-left: 0px solid;
border-left-color: #ffffff;
border-right: 0px solid;
border-right-color: #ffffff;
}
#pagehead
{
height: 204px;
border-bottom: 0px solid #000000;
background: #fff !important;
}
#topbar1
{
color: #ffffff;
/*background: none url(images/TopR.gif) no-repeat top left;*/
height: 204px;
}
#topbar2
{
color: #ffffff;
background: url(images/NAFF_webtracker_logo.gif) no-repeat top left;
height: 204px;
}
.loginBox
{
border: 1px solid #dfdfdf;
background: #ddedf5 url(images/Boxag.gif) repeat-x top left;
color: #666666;
padding: 10px 10px 10px 10px;
width: 170px;
}
.loginBox input[type="text"], .loginBox input[type="password"]
{
width: 169px;
}
.loginBox a, .loginBox a:visited
{
color: #666666;
}
.loginBox a:hover
{
color: #000000;
}
.LoginInstruction
{
position: absolute;
border: 1px solid #dfdfdf;
background: url(images/BoxBg.gif) repeat-x top left;
color: #666666;
padding: 15px;
left: 264px;
top: 220px;
right: 16px;
height: 322px;
}
#LoginStatusString
{
text-align: right;
color: #00A4E4;
background: none;
top: 113px;
right: 0px;
}
#menu
{
text-decoration: none;
font-weight: normal;
background: none;
text-align: center;
font-size: 9pt;
left: 231px;
top: 149px;
font-variant: normal;
line-height: 26px;
/*text-transform: uppercase;*/
}
#menu li
{
width: 124px;
height: 26px;
color: #00a4e4;
text-decoration: none;
background: url(images/MButtH.gif) no-repeat top left;
border: 0px solid;
}
#menu a, #menu a:visited
{
color: #005596;
background: url(images/MButt.gif) no-repeat top left;
text-decoration: none;
display: inline-block;
}
#menu a:hover
{
color: #00a4e4;
text-decoration: none;
background: url(images/MButtH.gif) no-repeat top left;
}
.DetailsTable
{
padding: 0px;
font-size: 11px;
}
.DetailsHeader
{
color: #005596;
font-size: 12px;
vertical-align: middle;
line-height: 24px;
}
.DetailsHeader td
{
background-image: url(images/MButt.gif);
background-repeat: repeat;
background-position: top left;
}
.DetailsHeader a
{
color: #005596;
font-weight: Normal;
}
.DetailsHeader a:hover
{
color: #000000;
}
a,
a:visited
{
color: #666666;
background: inherit;
}
a:hover
{
color: #000000;
background: inherit;
}
select, input
{
font-size: 11px;
}
.ContentSection
{
padding-left: 0px;
margin-top: 10px;
padding-bottom: 0px;
background: none;
}
.DetailsCell
{
color: #666666;
background: none;
}
.DetailsAlternatingCell
{
color: #666666;
background: #ebf9fe;
}
.TimeLineLegend
{
display: inline-block;
font-weight: bold;
background: none;
color: #000000;
text-align: center;
padding: 5px 5px 5px 5px;
border: solid 1px gray;
}
.TimeLineOverdue
{
background: #ffb6c1;
color: #000000;
white-space: nowrap;
text-align: center;
}
.TimeLinePending
{
background: #FFFF00;
color: #000000;
white-space: nowrap;
text-align: center;
}
.TimeLineCompleted
{
background: #98fb98;
color: #000000;
white-space: nowrap;
text-align: center;
}
.TimeLineCompletedLate
{
background: #ffcc99;
color: #000000;
white-space: nowrap;
text-align: center
}
.TimeLineEstimate
{
font-style: italic;
color: #000000;
background: inherit;
white-space: nowrap;
text-align: center;
}
.Button.FilterStripGroup_none
{
background-color: #ffffff;
}
#pagefooter
{
text-align: left;
padding-top: 8px;
border-top: 0px solid #000000;
border-bottom: 0px solid #000000;
margin-left: 30px;
margin-right: 30px;
height: 30px;
color: #666666;
font-size: 9px;
padding-left: 24px;
background: #dfdfe0;
}
#PageFooter a,
#PageFooter a:visited
{
color: #666666;
font-size: 10px;
}
#PageFooter a:hover
{
color: #000000;
font-size: 10px;
}
#LanguageSelection
{
position:absolute;
right: 10px;
}
html{
overflow-x:hidden;
}
#OuterContentPane{
background-image: url('Images/Rectangle2.jpg');
background-size: cover;
padding: 65px 30px 20px 30px !important;
}
#topbar1{
background-size: cover;
background-image:url('Images/header.jpg');
background-position: -50px -45px;
background-repeat: no-repeat;
}
#topbar2{
display: none;
}
#loginBox, #QuickViewDetails{
margin: 0 auto;
min-width: 250px;
max-width: 440px
max-width:100%;
background-color: #fff;
padding: 20px 40px
}
#OuterContentPane select, #OuterContentPane input{
max-width: 300px;
padding: 5px 6px;
}
.loginBox input[type="text"], .loginBox input[type="password"]{
width: 100% !important;
padding: 5px;
margin-bottom: 15px;
padding: 5px 6px;
background: #fff;
}
#SigninBtn, #FindBtn{
padding: 5px 19px;
border-radius: 0px;
background-color: #BF4646;
color: #fff;
margin-bottom: 20px;
border: none;
cursor:pointer;
-webkit-transition: background-color .8s; /* Safari */
transition: background-color .8s;
}
#SigninBtn:hover, #FindBtn:hover{
background-color:#09517B;
-webkit-transition: background-color .8s; /* Safari */
transition: background-color .8s;
}
#pagefooter{
background-color:#333;
margin: 0px;
width:100%;
min-height:75px;
color:#fff;
}
#menu{
width: 100%;
left: 1px;
top: 160px;
}
#menu, #menu *{
background:#fff !important;
}
#menu > li{
width: 14.2%;
min-width: 95px;
}
#menu > li > ul{
min-width: 200px;
width: auto;
}
#ctl06_ctl01_ctl62_ctl00, #ctl06_ctl01_ctl61_ctl00{
max-width: 110px;
}
#media(max-width:400){
#topbar1{
background-position: -40px -30px;
}
}
You can use the !important keyword in CSS. This will override default styles.
#topbar2
{
color: #ffffff;
background: url(images/NAFF_webtracker_logo.gif) no-repeat top left !important;
height: 204px;
}
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.
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;
}