I'm designing a website and having a problem with my links. When I click on them they shift to the left. Sometimes this prevents them from actually being clickable. I have not been able to find a single solution through googling and have no idea what part of my code is causing this. Any help would be appreciated.
Website
body {
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
color: #151515;
font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #F9F9F9;
font-style: normal;
font-variant: normal;
font-weight: lighter;
font-size: small;
list-style-type: none;
text-align: center;
}
#header {
background-color: #171717;
float: left;
text-align: center;
height: 75px;
width: 100%;
}
#header1 {
padding-top: 21px;
background-color: #171717;
width: 20%;
float: left;
text-align: center;
}
#header2 {
background-color: #171717;
float: left;
text-align: center;
width: 20%;
padding-top: 33px;
font-size: 11px;
}
#header2 ul {
list-style-type: none;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
padding-left: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
background-color: undefined;
font-size: small;
}
#header2 a {
width: 20%;
display: block;
float: left;
text-align: center;
font-size: 11px;
font-weight: bold;
text-decoration: none;
color: #CCCCCC;
}
#header2 a:hover , a:active, a:focus{
text-decoration: none;
color: #ffffff;
float: left;
}
#header3 {
float: left;
width: 20%;
text-align: center;
font-size: 11px;
padding-top: 23px;
font-weight: bold;
-webkit-box-shadow: 0px 0px;
box-shadow: 0px 0px;
}
#search {
width: 15%;
}
#search input[type="text"] {
background-repeat: no-repeat;
background-position: 10px 6px;
background-image: url(https://gray.secure-host.com/thefilterconnection/shopsite_sc/store/html/media/search-dark.png);
background-color: #909090;
border: 0 none;
font: bold 12px Arial,Helvetica,Sans-serif;
color: #CCCCCC;
padding-top: 6px;
padding-bottom: 6px;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
text-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2) inset;
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2) inset;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2) inset;
-webkit-transition: all 0.7s ease 0s;
-moz-transition: all 0.7s ease 0s;
-o-transition: all 0.7s ease 0s;
transition: all 0.7s ease 0s;
padding-left: 35px;
}
#header4 {
width: 20%;
text-align: center;
float: left;
padding-top: 16px;
font-size: 11px;
font-weight: bold;
color: #CCCCCC;
}
#header5 {
width: 20%;
background-color: #171717;
text-align: center;
padding-top: 13px;
font-size: 11px;
font-weight: bold;
float: left;
color: #CCCCCC;
}
#productmenucontainer {
background-color: #171717;
width: 100%;
clear: both;
float: center;
height: 30px;
}
#productmenu {
width: 100%;
background-color: #171717;
padding-top: 3px;
text-align: center;
right: auto;
left: auto;
max-width: 100%;
}
#container1 {
float: left;
width: 100%;
background-color: #EBEBEB;
position: relative;
right: 75%;
}
#container2 {
float: left;
width: 100%;
background-color: #FFFFFF;
overflow: hidden;
position: relative;
}
#container3 {
min-width: 740px;
max-width: 1000px;
margin-left: auto;
margin-right: auto;
clear: left;
float: none;
display: inline-block;
-webkit-box-shadow: 1px 1px 5px 1px #DBDBDB;
box-shadow: 1px 1px 5px 1px #DBDBDB;
width: 100%;
}
#sidebar1 {
float: left;
width: 17%;
position: relative;
left: 75%;
padding-left: 4%;
padding-top: 2%;
text-align: left;
padding-bottom: 2%;
padding-right: 4%;
}
#sidebar1 ul {
list-style-type: none;
margin-left: -25px;
margin-top: 2px;
float: left;
width: 100%;
text-align: left;
}
#main {
float: left;
width: 64%;
position: relative;
left: 75%;
padding-left: 4%;
padding-top: 2%;
padding-bottom: 2%;
padding-right: 4%;
}
#footer {
background-color: #F9F9F9;
font-weight: lighter;
padding-top: 4px;
font-size: 11px;
text-align: center;
clear: left;
padding-bottom: 4px;
color: #6C6C6C;
min-width: 740px;
max-width: 1000px;
width: 100%;
margin-right: auto;
margin-left: auto;
position: relative;
display: inline-block;
}
#disclaimer {
text-align: center;
float: left;
width: 23%;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 1%;
padding-right: 1%;
}
#creditcards {
width: 35%;
float: left;
padding-top: 5px;
}
#share {
width: 20%;
text-align: center;
float: left;
padding-top: 5px;
}
#follow {
float: left;
padding-top: 5px;
width: 20%;
}
#copyright {
clear: left;
float: left;
text-align: center;
padding-top: 5px;
width: 100%;
background-color: #626262;
color: #F3F3F3;
font-size: x-small;
font-weight: bold;
font-style: italic;
}
a:link {
color: #575757;
text-decoration: none;
font-weight: bold;
font-size: small;
}
a:visited {
color: #6C6C6C;
}
a:hover, a:active, a:focus {
text-decoration: none;
color: #7F7F7F;
}
.menu {
background-color: #B1CCE0;
text-align: center;
width: 100%;
min-width: 740px;
max-width: 1000px;
left: auto;
right: auto;
float: left;
margin-left: auto;
margin-right: auto;
}
.menu > span {
display:inline-block;
margin:0 auto;
}
#nav {
display: inline;
text-align: left;
position: relative;
list-style-type: none;
z-index: 1000;
}
#nav > li {
float: left;
padding: 0;
position: relative;
color: #6C6C6C;
}
#nav > li > a {
border: 1px solid transparent;
color: #CCCCCC;
display: block;
font-size: small;
padding: 3px 10px;
position: relative;
text-decoration: none;
font-weight: bolder;
-webkit-box-shadow: 0px 0;
box-shadow: 0px 0;
text-shadow: 0px 0;
}
#nav > li > a:hover {
background-color: #e4ecf4;
border-color: #999;
}
#nav > li.selected > a {
background-color: #171717;
border-color: #999999 #999999 #FFFFFF;
z-index: 2;
}
#nav li div {
position:relative;
}
#nav li div div {
background-color: #FFFFFF;
border: 1px solid #999999;
padding: 12px 0;
display: none;
margin: 0;
position: absolute;
top: -1px;
z-index: 1;
width: 190px;
}
#nav li div div.wrp2 {
width: 380px;
background-color: #171717;
}
#nav .sep {
left:190px;
border-left:1px solid #E3E3E3;
bottom:0;
height:auto;
margin:15px 0;
position:absolute;
top:0;
width:1px;
}
#nav li div ul {
padding-left: 10px;
padding-right: 10px;
position: relative;
width: 170px;
float: left;
list-style-type: none;
background-color: #171717;
}
#nav li div ul li {
margin:0;
padding:0;
}
#nav li div ul li h3 {
border-bottom: 1px solid #E3E3E3;
color: #4F87C5;
font-weight: bold;
margin: 0 5px 4px;
padding-bottom: 3px;
padding-top: 3px;
font-size: small;
}
#nav li div ul li h3 a {
color: #4F87C5;
font-weight: bold;
font-size: small;
}
#nav li div ul li h3 a:hover {
color: #89B3E1;
font-weight: bold;
font-size: small;
}
#nav li ul ul {
padding-top: 0;
padding-right: 0;
padding-left: 0;
padding-bottom: 0;
bottom: 8px;
}
#nav li ul ul li {
margin-bottom: 1px;
padding-top: 3px;
padding-right: 5px;
padding-left: 5px;
padding-bottom: 3px;
}
#nav li ul ul li a {
color: #CCCCCC;
display: block;
text-decoration: none;
font-size: 10px;
font-weight: bold;
}
#nav li ul ul li a:hover{
background-color: #171717;
color: #ffffff;
}
#header2 a:hover , a:active, a:focus{
text-decoration: none;
color: #ffffff;
**float: left;**
}
This is the part I'm most suspicious of. What happens without the float: left - or, if you apply it to those links in their original CSS rule, not the :active one?
You have an issue in your css file demopage.css on line 61, you need to remove a:active and a:focus from that declaration. Basically on every click on all a tags on your page they get a float: left value. So if you remove them from it everything will work perfectly :)
I have tested it on your site and it works :)
So from this
#header2 a:hover, a:active, a:focus {
text-decoration: none;
color: #ffffff;
float: left;
}
to this
#header2 a:hover {
text-decoration: none;
color: #ffffff;
float: left;
}
Related
I am working on this project :
body {
background: #f0f0f0;
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
outline: none;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: #313131;
font-size: 62.5%;
line-height: 1;
}
/** typography **/
h1 {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 2.5em;
line-height: 1.5em;
letter-spacing: -0.05em;
margin-bottom: 20px;
padding: .1em 0;
color: #444;
position: relative;
overflow: hidden;
white-space: nowrap;
text-align: center;
}
h1:before,
h1:after {
content: "";
position: relative;
display: inline-block;
width: 50%;
height: 1px;
vertical-align: middle;
background: #f0f0f0;
}
h1:before {
left: -.5em;
margin: 0 0 0 -50%;
}
h1:after {
left: .5em;
margin: 0 -50% 0 0;
}
h1 > span {
display: inline-block;
vertical-align: middle;
white-space: normal;
}
h2 {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 2.1em;
line-height: 1.4em;
letter-spacing: normal;
margin-bottom: 20px;
padding: .1em 0;
color: #444;
position: relative;
overflow: hidden;
white-space: nowrap;
text-align: center;
}
p {
display: block;
font-size: 1.4em;
line-height: 1.55em;
margin-bottom: 22px;
color: #555;
}
a { color: #5a9352; text-decoration: none; }
a:hover { text-decoration: underline; }
.center { display: block; text-align: center; }
/** page structure **/
#w {
width: 90%;
margin: 0 auto;
padding-top: 30px;
padding-bottom: 45px;
}
#content {
display: block;
width: 100%;
background: #fff;
padding: 25px 20px;
padding-bottom: 35px;
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
-moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
}
#userphoto {
display: block;
float: right;
margin-left: 10px;
margin-bottom: 8px;
}
#userphoto img {
display: block;
background: #fff;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.4);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.4);
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
/** profile nav links **/
#profiletabs {
display: block;
margin-bottom: 4px;
height: 50px;
}
#profiletabs ul { list-style: none; display: block; width: 70%; height: 50px; padding-left: 0;}
#profiletabls ul li { float: left; }
#profiletabs ul li a {
display: block;
float: left;
padding: 8px 11px;
font-size: 1.2em;
font-weight: bold;
background: #eae8db;
color: #666;
margin-right: 7px;
border: 1px solid #fff;
-webkit-border-radius: 5px;
-webkit-border-bottom-left-radius: 0;
-moz-border-radius: 5px;
-moz-border-radius-bottomleft: 0;
border-radius: 5px;
border-bottom-left-radius: 0;
}
#profiletabs ul li a:hover {
text-decoration: none;
background: #dad7c2;
color: #565656;
}
#profiletabs ul li a.sel {
background: #fff;
border-color: #d1cdb5;
}
/** clearfix **/
.clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; }
.clearfix { display: inline-block; }
<div id="w">
<div id="content" class="clearfix">
<div id="userphoto"><img src="images/avatar.png" alt="default avatar"></div>
<h1>Minimal User Profile Layout</h1>
<nav id="profiletabs">
<ul class="clearfix">
<li>Projects</li>
<!--<li>Activity</li>
<li>Friends</li>-->
<li>Profile Details</li>
<li>Orders</li>
<li>Add an article</li>
</ul>
</nav>
</div>
</div>
The main content of the page has been inserted in a div named #w. I have applied margin: 0 auto; to #w for it to be centered but it is not working correctly. The margin-left is always bigger than the right side, whenever I try to reduce the margin-left, I end up having something else.
Please let me know How I can fix this problem.
Remove
#content {
width: 100%;
}
Or add
#content {
box-sizing: border-box;
}
By default, the width does not include the padding. So the outer width is bigger.
Try this :
add box-sizing property in #content
#content{
box-sizing: border-box; // ADD this
display: block;
width: 100%;
background: #fff;
padding: 25px 20px;
padding-bottom: 35px;
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
-moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
}
This is because your #userphoto is overlapping you <h1> check this out with position:absolute on #userphoto.
body {
background: #f0f0f0;
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
outline: none;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: #313131;
font-size: 62.5%;
line-height: 1;
}
/** typography **/
h1 {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 2.5em;
line-height: 1.5em;
letter-spacing: -0.05em;
margin-bottom: 20px;
padding: .1em 0;
color: #444;
position: relative;
overflow: hidden;
white-space: nowrap;
text-align: center;
}
h1:before,
h1:after {
content: "";
position: relative;
display: inline-block;
width: 50%;
height: 1px;
vertical-align: middle;
background: #f0f0f0;
}
h1:before {
left: -.5em;
margin: 0 0 0 -50%;
}
h1:after {
left: .5em;
margin: 0 -50% 0 0;
}
h1 > span {
display: inline-block;
vertical-align: middle;
white-space: normal;
}
h2 {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 2.1em;
line-height: 1.4em;
letter-spacing: normal;
margin-bottom: 20px;
padding: .1em 0;
color: #444;
position: relative;
overflow: hidden;
white-space: nowrap;
text-align: center;
}
p {
display: block;
font-size: 1.4em;
line-height: 1.55em;
margin-bottom: 22px;
color: #555;
}
a { color: #5a9352; text-decoration: none; }
a:hover { text-decoration: underline; }
.center { display: block; text-align: center; }
/** page structure **/
#w {
width: 90%;
margin: 0 auto;
padding-top: 30px;
padding-bottom: 45px;
}
#content {
display: block;
width: 100%;
background: #fff;
padding: 25px 20px;
padding-bottom: 35px;
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
-moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
}
#userphoto {
display: block;
position: absolute;
right: 0;
margin-left: 10px;
margin-bottom: 8px;
}
#userphoto img {
display: block;
background: #fff;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.4);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.4);
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
/** profile nav links **/
#profiletabs {
display: block;
margin-bottom: 4px;
height: 50px;
}
#profiletabs ul { list-style: none; display: block; width: 70%; height: 50px; padding-left: 0;}
#profiletabls ul li { float: left; }
#profiletabs ul li a {
display: block;
float: left;
padding: 8px 11px;
font-size: 1.2em;
font-weight: bold;
background: #eae8db;
color: #666;
margin-right: 7px;
border: 1px solid #fff;
-webkit-border-radius: 5px;
-webkit-border-bottom-left-radius: 0;
-moz-border-radius: 5px;
-moz-border-radius-bottomleft: 0;
border-radius: 5px;
border-bottom-left-radius: 0;
}
#profiletabs ul li a:hover {
text-decoration: none;
background: #dad7c2;
color: #565656;
}
#profiletabs ul li a.sel {
background: #fff;
border-color: #d1cdb5;
}
/** clearfix **/
.clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; }
.clearfix { display: inline-block; }
<div id="w">
<div id="content" class="clearfix">
<div id="userphoto"><img src="images/avatar.png" alt="default avatar"></div>
<h1>Minimal User Profile Layout</h1>
<nav id="profiletabs">
<ul class="clearfix">
<li>Projects</li>
<!--<li>Activity</li>
<li>Friends</li>-->
<li>Profile Details</li>
<li>Orders</li>
<li>Add an article</li>
</ul>
</nav>
</div>
</div>
I have a WordPress site, with installed theme Enfold and the MemberMouse plugin.
I have also made some signup,login pages by using Membermouse.
But my login page is not nice.: http://i.stack.imgur.com/Vwy6b.png
I want to it make like this one or similar:http://i.stack.imgur.com/tR145.png
( reflexionyoga(dot)com/login/ )
Can someone guide me how to change CSS styles and make the changes?
Thanks
Here's a Styling page you could use:
body{
padding-left:20px;
margin: 0;
padding: 0;
text-align: left;
font-family: verdana, tahoma, arial, sans-serif;
background-color: #ACE367;
color: black;
}
p{
font-size: 15px;
margin: 10px;
padding-left: 15px;
}
a{
font-size: 15px
color: #958F81;
text-decoration: none;
}
h1{
color:#191970;
text-align: left;
font-size: 20px;
margin: 10px;
padding-left: 20px;
}
.big{
color: #191970;
font-size: 60px;
}
h2{
text-align: left;
font-size: 15px;
margin: 15px;
padding-left: 20px;
}
img{
border-radius: 8px;
border: 1px solid #ddd;
display: block;
margin: auto;
}
ul {
padding-left: 10px;
padding-top : 0;
list-style-type: none;
margin: 0;
padding: 50px;
width: 200px;
background-color: #ACE367;
font-family: "Lucida Console", Monaco, monospace;
}
li a {
display: block;
color: #000;
padding: 5px 10px;
text-decoration: none;
border-bottom: 1px solid #555;
}
li a:hover {
background-color: #555;
color: white;
}
.note{
color:red;
font-size:10px;
}
input, select {
width: 100%;
padding: 14px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input {
width: 100%;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
padding-left: 20px;
padding-right: 20px;
}
input[type=submit]:hover {
background-color: #45a049;
}
div {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
form {
padding-left: 50px;
padding-right: 600px;
padding-bottom: 20px;
padding-top: 15px;
}
.body-cen{
padding-left: 250px;
padding-right: 250px;
padding-bottom: 50px;
padding-top: 25px;
}
.pd{
padding-left:30px;
}
hr {
width:100%;
height:2px;
background: #fff
}
input[type=radio]{
padding-left:0;
}
p{
padding-left:10px;
}
I cant seem to figure out why the h1 tag is showing differently on mobile browsers.
The site is www.jd-financialservices.co.uk When I view the site on my desktop everything is fine. When I view it on my Nexus 4 however, the 10px gap between h1 and the .topbar div has gone. It's the same on Opera, Firefox and Chrome.
Can anyone help please?
Thank you in advance.
I would advise against using position:relative; and negative top on all of your elements.
With some minor changes to your css you will probably find that it fixes itself: here is my updated version of your css. See if that fixes things.
I updated: aside nav h1 .welcome and footer. By changing some of the header elements to use position:absolute and then using margin to space elements out. You will probably find the css is more compatible cross-browser/device.
#font-face { font-family: 'Constantia'; src: url('constantia/constantia.eot'); src: url('constantia/constantia.eot?#iefix') format('embedded-opentype'), url('constantia/constantia.svg#Constantia') format('svg'), url('constantia/constantia.woff') format('woff'), url('constantia/constantia.ttf') format('truetype'); font-weight: normal; font-style: normal;}
* {
margin-top: 0px;
margin-bottom: 0px;
}
html {
font-family: 'droid sans';
-webkit-font-smoothing: antialiased;
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
}
body {
width: 940px;
margin: 0 auto;
}
li {
list-style: none;
}
a {
text-decoration: none;
color: #ffffff;
}
a:hover {
text-decoration: underline;
}
header a:hover {
text-decoration: none;
}
h1 {
font-family: 'Constantia', helvetica;
position: absolute;
top: 20px;
}
header {
height: 140px;
position: relative;
margin-bottom: 40px;
}
nav {
width: 660px;
height: 30px;
background-color: #00788a;
position: absolute;
font-size: 1.2em;
bottom: 0;
right: 0;
}
nav li a {
color: #ffffff;
}
nav a:hover {
text-decoration: underline;
}
nav ul {
padding-left: 0px;
}
nav ul li {
display: inline;
line-height: 30px;
vertical-align: middle;
color: #ffffff;
padding-left: 70px;
padding-right: 65px;
}
aside {
height: 600px;
width: 240px;
float: left;
background-color: #00788a;
color: #ffffff;
clear: both;
position: relative;
text-align: center;
margin-bottom: 30px;
}
article a {
color: #00788a;
}
.contain {
width: 940px;
}
footer {
height: 100px;
clear: both;
background-color: #00788a;
color: rgba(255,255,255,0.5);
position: relative;
font-size: 0.85em;
padding: 0 10px;
line-height: 1.5em;
margin-top: 40px;
}
footer li {
display: inline;
border-left: 2px solid rgba(255,255,255,0.5);
padding: 0 5px;
}
footer li:first-child {
border: none;
}
footer ul {
padding-left: 0;
text-align: center;
}
.foot_fade {
color: rgba(255,255,255,0.5);
}
.first_initial {
font-size: 110px;
color: #00788a;
font-weight: lighter;
}
.second_initial {
font-size: 101px;
color: #00788a;
font-weight: lighter;
position: relative;
top: -6px;
}
.rest_of_title {
font-size: 26px;
position: relative;
left: -73px;
top: 20px;
font-weight: lighter;
}
header a {
color: #000000;
}
.header_background {
float: right;
position: relative;
z-index: -1;
}
.topbar {
width: 940px;
height: 30px;
background-color: #00788a;
}
.call_now {
padding: 10px 50px 10px 50px;
font-size: 1.5em;
line-height: 1.5em;
border-bottom: 5px solid #ffffff;
text-shadow: 2px 2px 2px #2a2a2a;
}
.home_service {
padding: 10px 40px 10px 40px;
font-size: 1.45em;
line-height: 1.5em;
border-bottom: 5px solid #ffffff;
text-shadow: 2px 2px 2px #2a2a2a;
}
.service_list {
font-size: 1.25em;
line-height: 3em;
text-align: left;
padding-top: 35px;
padding-left: 20px;
text-shadow: 2px 2px 2px #2a2a2a;
}
.welcome {
width: 660px;
float: right;
padding: 0px 0px 0px 40px;
font-size: 0.9em;
line-height: 2em;
color: #2a2a2a;
position: relative;
/* top: -95px; */
text-align: justify;
}
.services {
width: 660px;
float: right;
padding: 0px 0px 0px 40px;
position: relative;
top: -95px;
}
.services a {
text-decoration: none;
position: absolute;
top: 151px;
left: 0;
width: 275px;
color: #ffffff;
background-color: rgba(0,0,0,0.5);
padding: 10px 0 10px 10px;
}
.services div {
margin-bottom: 15px;
}
.services div:last-child {
margin-bottom: 0;
}
.savings_pic {
position: relative;
height: 190px;
width: 285px;
}
.retire_pic {
position: absolute;
top: 0;
right: 0;
height: 190px;
width: 285px;
}
.protection_pic {
position: relative;
height: 190px;
width: 285px;
}
.insurance_pic {
position: absolute;
top: 205px;
right: 0;
height: 190px;
width: 285px;
}
.mortgage_pic {
position: relative;
height: 190px;
width: 285px;
}
.retire {
width: 300px;
float: right;
margin: 0 0 10px 10px;
}
/*.shadow {
box-shadow: 0 0 3px 1px rgba(42,42,42,0.5);
margin: 3px 0;
}*/
.overlay {
background-color: rgba(0, 0, 0, 0.5);
bottom: 54px;
color: #FFFFFF;
padding: 10px;
position: relative;
width: 265px;
}
.overlay a {
text-decoration: none;
color: #ffffff;
}
.overlay a:hover {
}
.left {
float: left;
}
.right {
float: right;
}
.regulation {
font-style: italic;
color: #9a9a9a;
font-size: 0.9em;
}
.smallprint {
width: 520px;
font-size: 0.9em;
text-align: center;
position: absolute;
right: 210px;
top: 30px;
}
.copyright {
width: 310px;
margin: 0 auto;
}
.scapa {
position: absolute;
bottom: 0;
right: 10px;
font-size: 0.9em;
}
I have an Internet Explorer 7 css issue with my navigation menu.
The links are getting pushed out of line in Internet Explorer.
I think I have a padding problem, any help would be great!!!
http://jsfiddle.net/558pA/
body {
font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
color: #444;
font-size: 62.5%;
text-rendering: optimizeLegibility;
background: #fff;
}
li {
list-style: none;
}
a:link, a:visited {
color: #4083a9;
outline: none;
text-decoration: none;
}
a:hover {
text-decoration: none;
color: #205f82;
}
.green-btn {
background: #4cc44a;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#header {
width: 100%;
height: 50px;
background: #333;
background: rgba(47, 47, 47, 0.98);
z-index: 9997;
}
#header-inner {
position: relative;
margin: 0 auto;
padding: 0 12px;
max-width: 970px;
}
#logo {
float: left;
padding: 0px 20px 0 0;
}
#logo a {
display: block;
width: 82px;
height: 50px;
background-repeat: no-repeat;
background-position: 0 50%;
background-image: url(../img/assets/chartego-logo.png);
-webkit-transition: opacity 0.2s ease;
-moz-transition: opacity 0.2s ease;
-o-transition: opacity 0.2s ease;
transition: opacity 0.2s ease;
}
#logo img {
height: 0;
}
#logo a:hover {
opacity: .6;
}
#nav {
margin: 0 0px 0 20px;
color: #777;
padding:0px;
float:right;
}
#nav>li {
float: right;
font-size: 1.25em;
line-height: 1;
}
#nav>li>a {
display: block;
height: 50px;
padding: 0 20px;
line-height: 50px;
text-decoration: none;
color: #999;
}
#nav>li#user-profile {
float: right;
}
#nav>li img {
float: right;
position: relative;
top:13px;
}
#nav li ul.tabs {
width: 180px;
padding: 0 0 10px 0;
background: #333;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-border-top-left-radius: 0;
-moz-border-radius-topleft: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
-webkit-background-clip: padding-box;
-moz-background-clip: padding-box;
background-clip: padding-box;
z-index: 999;
position: absolute;
right: 0px;
}
#nav li ul.tabs li a {
display: block;
padding: 5px 15px;
font-size: 12px;
font-weight: normal;
line-height: 2;
color: #999;
background: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
#nav li ul.tabs li a:hover {
color: #ddd;
background: rgba(255, 255, 255, 0.1);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
#nav li ul.tabs li {
clear: left;
margin: 0;
width: 100%;
}
#nav li#user-profile ul.tabs li:first-child a {
font-weight: bold;
}
#toggle-nav {
display: none;
}
#nav li#user-profile span.profile-name {
display: none;
}
#chart-btn {
background: #4cc44a;
color: white;
padding: 10px 20px;
margin-top: 8px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
margin-right: 20px;
}
#chart-btn a {
color: white !important;
}
/* =============================================================================
NAVIGATION MEDIA MAX 800PX
========================================================================== */
#media screen and (max-width: 800px) {
#header {
position: fixed;
height: 40px;
}
#toggle-nav {
position: absolute;
top: 0;
left: 0px;
display: block;
width: 48px;
height: 40px;
text-indent: -9999px;
background-repeat: no-repeat;
background-position: 15px 50%;
background-image: url(../img/assets/icon-hamburger.png);
opacity: .5;
}
#logo a {
display: block;
height: 40px;
margin: 0 auto 0 auto;
}
#logo {
float: none;
padding-right: 0;
text-align: left;
}
#nav {
float: left;
width: 100%;
margin: 0 0 10px 0;
text-align: left;
}
#nav li {
position: relative;
float: none;
margin-right: 0;
text-align: left;
font-size: 12px;
background: rgba(47, 47, 47, 0.98);
}
#nav li ul.tabs {
display: block;
position: static;
float: none;
width: 100%;
left: 0;
margin: 0;
padding: 0;
background: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
#nav li ul.tabs li a {
padding: 15px;
font-size: 12px;
font-weight: normal;
line-height: 1;
text-transform: none;
}
#nav li#user-profile {
float: none;
}
#nav li#user-profile img {
float: left;
margin: 0 8px 0 0;
}
#nav li#user-profile span.profile-name {
display: inline;
}
#nav li a:hover {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
color: #fff;
}
#nav li ul.tabs li a:hover {
color: #999;
background: none;
}
#nav li#user-profile ul.tabs li:first-child {
display: none;
}
#header-inner {
width: auto;
padding: 0;
}
#nav li a {
height: auto;
padding: 15px;
font-size: 14px;
font-weight: bold;
line-height: 1;
border-top: 1px solid rgba(255, 255, 255, 0.08);
color: #fff;
}
#nav>li img {
top:0px;
}
#chart-btn {
background:none;
color: white;
padding: 10px 20px;
margin-top: 8px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
margin-right: 20px;
}
#chart-btn a {
color: white !important;
}
}
I am struggling mightily with the following CSS3 code:
*
{
margin: 0px;
padding: 0px;
border: none;
}
body
{
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DBDBDB), to(#FFFFFF), color-stop(.7,#FFFFFF));
padding: 0px 6%;
}
#nav {
background: url(http://74.71.27.20/d499/content/images/nav_background.png);
}
ul#nav {
float: left;
}
ul#nav li {
display: inline;
width: 100%;
}
ul#nav li a {
display: inline;
float: left;
margin-right: 25px;
margin-left: 10px;
font-size: 16px;
line-height: 44px;
text-align: center;
text-decoration: none;
color: #777;
}
ul#nav li a:hover {
color: #fff;
}
ul#nav li.selected a {
color: #fff;
}
ul#nav li.subscribe a {
margin-left: 22px;
padding-left: 33px;
text-align: left;
background: url(http://74.71.27.20/d499/content/images/rss.png) left center no-repeat;
}
#container
{
float: left;
background: #FFFFFF;
overflow: hidden;
padding: 0 0 15px 10px;
}
#header
{
float: left;
width: 100%;
margin-bottom: 10px;
}
#header h1
{
font-size: 18px;
float: left;
background: url(http://74.71.27.20/d499/content/Images/logo.png) no-repeat;
padding: 45px 0px 5px 0px;
}
#promotion
{
height: 300px;
width: 700px;
background: url(http://74.71.27.20/d499/content/Images/home-showcase.png) no-repeat;
}
ul li a
{
font-size: 16px;
}
#main
{
float: left;
overflow: hidden;
padding: 0 0 15px 10px;
}
ul
{
list-style-type: square;
margin-left: 25px;
font-size: 14px;
}
ul#album-list
{
list-style: none;
margin-left: 0px;
}
ul#album-list li
{
height: 130px;
width: 100px;
float: left;
margin: 10px;
text-align: center;
}
ul#album-list li a, ul#album-list li .button
{
font-size: 13px;
float: left;
}
ul#album-list li a span
{
color: #9b9993;
text-decoration: underline;
}
#cart
{
float: right;
}
#update-message
{
color: #F6855E;
font-weight: bold;
}
.button, input[type=submit]
{
clear: both;
display: inline-block;
padding: 5px;
margin-top: 10px;
border: 1px;
background: #5e5b54;
color: #fff;
font-weight: bold;
}
.button a
{
color: #fff !important;
}
footer {
float: left;
left: 0;
width: 100%;
background: #222;
}
footer div {
display: table;
margin: 0 auto;
padding: 44px 0;
width: 940px;
color: #777;
}
p
{
margin-bottom: 15px;
margin-top: 0px;
}
h2
{
color: #5e5b54;
}
h2, h3
{
margin-bottom: 10px;
font-size: 16px;
font-style: italic;
font-weight: bold;
}
h3
{
color: #9B9993;
}
#header h1 a, h3 em
{
color: #5E5B54;
}
a:link, a:visited
{
color: #F6855E;
text-decoration: none;
font-weight: bold;
}
a:hover
{
color: #333333;
text-decoration: none;
font-weight: bold;
}
a:active
{
color: #006633;
text-decoration: none;
font-weight: bold;
}
/***************************** sidebar navigation ****************************/
#categories
{
float: left;
margin: 22px 0 0 22px;
padding: 11px 22px;
background: url(http://74.71.27.20/d499/content/images/sidebar_section_background.png) repeat-x;
/* Border-radius not implemented yet */
-moz-border-radius: 11px;
-webkit-border-radius: 11px;
}
ul#categories
{
siaply: inlinel
margin: 0 0 0 22px;
list-style: none;
}
#categories a:link, #categories a:visited
{
float: left;
color: #9B9993;
text-decoration: none;
}
#categories a:hover
{
color: #F46739;
}
div#album-details p
{
margin-bottom: 5px;
color: #5e5b54;
font-weight: bold;
}
p em
{
color: #9b9993;
}
/* Form styles */
legend
{
padding: 10px;
font-weight: bold;
}
fieldset
{
border: #9b9993 1px solid;
padding: 0 10px;
margin-bottom: 10px;
clear: left;
}
div.editor-field
{
margin-bottom: 10px;
}
input[type=text], input[type=password], select
{
border: 1px solid #8A8575;
width: 300px;
}
/* Begin: Tables */
table
{
border: 1px solid #000;
border-collapse: collapse;
color: #666666;
min-width: 500px;
width: 100%;
}
tr
{
border: 1px solid #000;
line-height: 25px;
}
th
{
background-color: #9b9993;
color: #000;
font-size: 13px;
text-align: left;
}
th, td
{
padding-left: 5px;
}
tr:hover
{
background-color: #fff;
}
I currently got my PC as a web host you can view the site with the CSS here:
http://74.71.27.20/d499
Any help would be appreciated.
My master page simply calls container then header and nav and categories and footer.
The best CSS advice I can give if you have div issues is to look into YUI it is JUST css, so don't think it is some crazy new technology but it can be a huge help.
Watch this introductory video about it: http://video.yahoo.com/watch/1373808/4732784
The above video is a little dated but gives a good idea and the web is full of the required resources.
Add a clear:both; as your first div is floated left.