How can I get this CSS to display properly in IE8? - html

So I don't have to post too much code the page is: http://www.ketchikanvet.com . The problem is I can't get the tabs to be attached to the pane in IE8. The majority of the vets clients use IE8 apparently so this is making it a pain in the ass for me. Anyone know why? CSS is:
html {
margin: 0;
padding: 0;
}
body {
width: 100%;
text-align: center;
margin: 0;
padding: 0;
background-color: #17BFEE;
color: #111111;
font-family: Arial, sans-serif;
}
h1 {
margin: 0;
font-family: 'Marmelad', sans-serif;
font-size: 5em;
color: #111111;
text-shadow: 0px 2px 3px #efefef;
}
#header {
text-align: center;
margin-top: 10px;
margin-bottom: 30px;
}
#content {
text-align: left;
margin: 0 auto;
width: 70%;
}
/* root element for tabs */
ul.tabs {
margin:0 !important;
margin-bottom: 0;
padding:0;
height:30px;
}
/* single tab */
ul.tabs li {
float:left;
padding:0;
margin:0;
list-style-type:none;
}
/* link inside the tab. uses a background image */
ul.tabs a {
float:left;
font-size:13px;
display:block;
padding:5px 30px;
text-decoration:none;
border:2px solid #001401;
border-bottom:0px;
height:18px;
background-color:#ddd;
color:#000;
margin-right:2px;
margin-bottom: 0;
position:relative;
outline:0;
border-radius:5px 5px 0 0;
}
ul.tabs a:hover {
background-color:#F7F7F7;
color:#000;
}
/* selected tab */
ul.tabs a.current {
background-color:#F0F0FF;
border-bottom:2px solid #F0F0FF;
color:#000;
cursor:default;
}
/* tab pane */
.panes div {
display:none;
border:2px solid #001401;
min-height:150px;
padding:15px 20px;
background-color:#F0F0FF;
border-radius: 0 5px 5px 5px;
box-shadow: 1px 1px 8px #C4C4C4;
}
/*End of Tabs*/
#gallery img {
border: 2px solid #001401;
border-radius: 5px;
margin-right: 5px;
}
#gallery img:hover {
border: 2px solid #494949;
}
#footer a {
color: #111111;
text-decoration: none;
}
#footer a:hover {
color: #efefef;
}
#addhours {
width: 100%;
}
#addhours td {
width: 50%;
}
.clear {
clear: both;
}
a {
text-decoration: none;
color: #890224;
}
a:hover {
text-decoration: none;
color: #890224;
}
a:visited {
text-decoration: none;
color: #890224;
}
.falselink {
cursor: pointer;
}
.bioimage {
box-shadow: 1px 1px 8px #C4C4C4;
border: 2px solid #001401;
border-radius: 10px;
}
.photo {
box-shadow: 1px 1px 8px #C4C4C4;
border: 2px solid #001401;
border-radius: 10px;
}
#browsercheck {
color: #ff0000;
}

add to UL.tabs A
border-bottom-color:rgb(221, 221, 221);
border-bottom-style:solid;
border-bottom-width:2px;

I added a height of 32px to your anchors inside the ul.tabs and it seemed to be what you're looking for.
ul.tabs a {height:32px;}
If you're using the html5 boiler plate you can target ie alone.
.ie8 ul.tabs a {height:32px;}

Related

css class not working properly

i'm redesigning my website. and doing that i'm finding myself in some problems using the css code i wrote.
i use div's to get an image and some text next to each other.
i'm unable to get the text moved to the correct place (see pictures) the margin-left doesn't seem to work when it is in the css file but it works when directly embedded in the div tags, am i doing something wrong?
also i'dd like to add that i don't need to set the image size in the html code but its in the css code is this possible?
What i get
What i want
body
{
background:#333 url(bg.jpg) repeat top left;
font-family:Arial;
color:white;
text-align:center;
}
body header.heading
{
width:1150px;
/*background:transparent url(../images/menu/MEbanner.jpg) no-repeat top;
background-size: 1150 100px;
padding-top:101px;*/
margin:0 auto;
z-index:0;
}
body.Content
{
width:1150px;
}
main
{
width:1150px;
margin: 0 auto;
}
section
{
text-align:left;
margin:0 auto;
}
header nav
{
width:1150px;
background:transparent url(../images/menu/MEbanner.jpg) no-repeat top;
background-size: 1150 100px;
padding-top:101px;
margin:0 auto;
z-index:0;
}
header nav ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
header nav li {
float: left;
border-right: 1px solid #bbb;
}
header nav li:last-child {
border-right: none;
}
/*header nav li a {
display: block;
color: white;
text-align: center;
padding: 20px 16px;
text-decoration: none;
}*/
/* Change the link color to #111 (black) on hover */
header nav li a:hover {
background-color: #111;
}
header nav li.active {
background-color: #4CAF50;
}
header nav li a, .dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 20px 16px;
text-decoration: none;
}
header nav li a:hover, .dropdown:hover .dropbtn {
background-color: #111;
}
header nav li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {background-color: #f1f1f1}
.dropdown:hover .dropdown-content {
display: block;
}
nav
{
text-align:left;
margin:0 auto;
}
.hidden {display:none}
hr
{
border-left: none;
border-right: none;
height:4px;
margin: 2em 0 2em 0;
}
main a:link {color:#fff;} /* unvisited link */
main a:visited {color:#fff;} /* visited link */
main a:hover {color:#159;} /* mouse over link */
blockquote{
color:white;
border-left: 8px solid;
border-color: #0BD676;/*#0DFF8C;*/
padding-left:10px;
}
h2
{
font-size: 30px;
color:Black;
}
h1,h2,h3,h4
{
font-family: 'Open Sans Condensed', sans-serif;
color:#4CAF50;
text-decoration:underline;
}
h2, h3
{
font-size: 1.6em;
letter-spacing: -1px;
margin: 0 0 0.75em 0;
}
h3
{
font-size:1.3em;
}
h1
{
font:bold;
}
h4
{
font-size:1em;
margin: 0.5em 0 0.5em;
padding-left:1em;
}
.green
{
border-left: 8px solid;
border-color: #0BD676;/*#0DFF8C;*/
padding-left:10px;
color: #4CAF50;
margin-left:40px;
font-style:oblique;
}
article.centeralign
{
text-align:center;
}
div.wrapper{
width: 800px;
overflow: hidden;
}
div.toolsWrapper{
width: 980px;
overflow: hidden;
}
div.left{
width: 200px;
float:left;
margin-right:40px;
padding-left:40px;
}
div.right{
float:left;
margin-left: 20px;
}
div.cc
{
width:200px;
text-align:right;
font-size:10px;
}
div.ccf
{
text-align:center;
font-size:12px;
}
iframe
{
text-align:center;
float:center;
}
/* ===========================
====== Contact Form =======
=========================== */
input, textarea {
padding: 10px;
border: 1px solid #E5E5E5;
width: 200px;
color: #999999;
box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
}
textarea {
width: 400px;
height: 150px;
max-width: 400px;
line-height: 18px;
}
input:hover, textarea:hover,
input:focus, textarea:focus {
border-color: 1px solid #C9C9C9;
box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
}
.form label {
margin-left: 10px;
color: #999999;
}
/* ===========================
====== Submit Button ======
=========================== */
.submit input {
width: 100px;
height: 40px;
background-color: #474E69;
color: #FFF;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
table, th, td {
border: 1px solid black;
border-color:white;
}
th, td {
padding: 15px;
}
.blue{
background: url(blue.png) no-repeat left center;
color: #109CEF;
padding: 0px 40px 0px 20px;
font-style:oblique;
}
.red{
background: url(red.png) no-repeat left center;
color:#FF0000;
padding: 0px 40px 0px 20px;
font-style:oblique;
}
<article>
<h1>Audio Projects</h1>
<blockquote>
<h3>
<a href="Damp">
Class D Amplifier
</a>
</h3>
<div class="wrapper">
<div class="left">
<img src="Damp/Damp_front.JPG"/>
</div>
<div class="right">
Some text that should be next to image
</div>
</div>
</blockquote>
</article>
I changed those:
.h1 {
text-align: left;
}
.h3 {
text-align: left;
}
div.left{
float: left;
}
div.right {
width: 500px;
float: left;
margin-left: 20px;}
results
https://i.stack.imgur.com/7rswY.png
You just need to change a few styles, and replace the <article> with a <div> (For IE support)
div.wrapper {
width: 800px;
overflow: hidden;
}
div.toolsWrapper {
width: 980px;
overflow: hidden;
}
div.left {
width: 200px;
float: left;
margin-right: 40px;
padding-left: 40px;
}
div.right {
color: white;
display: inline-block;
position: absolute;
top: 0;
}
.wrapper {
position: relative;
width: 50%;
}
.title {
color: #4B9F49;
}
.inner_title {
color: white;
}
.blockquote {
border-left: 3px solid #0CD673;
padding-left: 5px;
}
#article {
background: black;
}
<div id="article">
<h3>
Audio Projects
</h3>
<blockquote class="blockquote">
<h3>
Class D Amplifier
</h3>
<div class="wrapper">
<img src="Damp/Damp_front.JPG" style="height:80px; width:200px;"/>
<div class="right">
Some text that is now next to the image.
</div>
</div>
</blockquote>
</div>
I guess problem is with width of left class division. Try to make it auto.
div.left{
width: auto;
....
}
Option 1, my preferred way of doing this:
Remove the float in .left take the inline left margin out of the .right and give both .left and .right
display: inline-block;
Giving you
div.left{
width: 200px;
/*float:left;*/
display: inline-block;
margin-right:40px;
padding-left:40px;
}
div.right{
display: inline-block;
width: 520px;
margin-left: 20px;
}
For those two classes
Option 2:
Give both a float:left
div.left{
width: 200px;
float:left;
margin-right:40px;
padding-left:40px;
}
div.right{
float:left;
width: 520px;
margin-left: 20px;
}
This should cause them to stack in the same way that inline-block does, but floats can cause trouble later. In either case you have to limit the width on .right or the text will prefer to be full width and not be inline, but rather be below the image. The total width of the two divs has to be less than the available width in .wrapper
Your image is probably larger than the .left container (given that this is the only element that is not included in your snippet to test properly).
Try the following ...
img{
height: auto;
width: auto;
max-height: 100%;
max-width: 100%;
}
... you should probably add a class for that image, rather than styling all images this way.
well, what i can advice you is to put the text in the same division as the image like in paragraph tag and then give the image css attribute called "float:left" according to what you want.
thank you
hope this is going to help you
use .classname only
instead of div.classname

Navigation bar -- links don't work

On the navigation bar, the link only works if I hover over the TEXT however it doesnt work if I hover underneath or above the text (between the 1 px horizontal lines and the text) here is a link to the jsfiddle http://jsfiddle.net/hp20wcrd/
<!DOCTYPE html>
<html>
<head>
<style>
.menu {
font-family: Verdana, Arial;
position:fixed;
background:transparent;
width:100%;
top:100px;
left:0;
height:25px; /* decide on this as some stage */
padding: 0;
text-align:center;
font-size: 12px;
font-weight: 600; /* decide on this as some stage */
padding-top: 10px; /* decide on this as some stage */
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
.ty-menu__items {
position: absolute;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
width:100%;
text-align: center;
}
.ty-menu__item {
display: inline-block;
padding-right: 50px;
padding-left: 50px;
}
a:link, a:visited {
display: block;
width: 100%;
font-weight: light;
color: #494949;
background: transparent;
text-align: center;
text-decoration: none;
text-transform: uppercase;
}
a:hover, a:active {
padding-bottom:7px; /* decide on this as some stage */
background: transparent;
border-bottom: 3px solid #9B9B9B; /* decide on this as some stage */
color: #9B9B9B; /* decide on this as some stage */
}
</style>
</head>
<body>
<div class="menu">
<ul class="ty-menu__items">
<li class="ty-menu__item">home</li>
<li class="ty-menu__item">news</li>
<li class="ty-menu__item">contact</li>
<li class="ty-menu__item">about</li>
</ul>
</div>
</body>
</html>
Try this (your a is not all clickable, you must create vertical full clickable on your a using padding)
CSS
.menu {
font-family: Verdana, Arial;
position:fixed;
background:transparent;
width:100%;
top:100px;
left:0;
height:35px; /* decide on this as some stage */
padding: 0;
text-align:center;
font-size: 12px;
font-weight: 600; /* decide on this as some stage */
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
.ty-menu__items {
position: absolute;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
width:100%;
text-align: center;
}
.ty-menu__item {
display: inline-block;
padding-right: 50px;
padding-left: 50px;
}
a:link, a:visited {
display: block;
width: 100%;
font-weight: light;
color: #494949;
background: transparent;
text-align: center;
text-decoration: none;
text-transform: uppercase;
padding: 10px 0px;
}
a:hover, a:active {
padding-bottom:7px; /* decide on this as some stage */
background: transparent;
border-bottom: 3px solid #9B9B9B; /* decide on this as some stage */
color: #9B9B9B; /* decide on this as some stage */
}
DEMO HERE
You can add padding in a element instead:
.menu {
font-family: Verdana, Arial;
position: fixed;
background: transparent;
width: 100%;
top: 100px;
left: 0;
height: 25px;
/* decide on this as some stage */
padding: 0;
text-align: center;
font-size: 12px;
font-weight: 600;
/* decide on this as some stage */
/* decide on this as some stage */
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
padding-bottom: 10px;
}
.ty-menu__items {
position: absolute;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
width: 100%;
text-align: center;
}
.ty-menu__item {
display: inline-block;
padding-right: 50px;
padding-left: 50px;
}
a:link,
a:visited {
display: block;
width: 100%;
font-weight: light;
color: #494949;
background: transparent;
text-align: center;
text-decoration: none;
text-transform: uppercase;
padding-top: 10px;/*add padding top*/
padding-bottom: 10px;/*add padding bottom*/
}
a:hover,
a:active {
padding-bottom: 7px;
/* decide on this as some stage */
background: transparent;
border-bottom: 3px solid #9B9B9B;
/* decide on this as some stage */
color: #9B9B9B;
/* decide on this as some stage */
}
<div class="menu">
<ul class="ty-menu__items">
<li class="ty-menu__item">home
</li>
<li class="ty-menu__item">news
</li>
<li class="ty-menu__item">contact
</li>
<li class="ty-menu__item">about
</li>
</ul>
</div>
It's because you gave padding to the ul element and its parent, not the actual anchor, which is the "clickable" area. Something like this should work (with removing the extra padding on the ul element):
.ty-menu__item a {
padding: 8px 0 6px;
}
See it here:
.menu {
font-family: Verdana, Arial;
position:fixed;
background:transparent;
width:100%;
top:100px;
left:0;
height:32px; /* decide on this as some stage */
padding: 0;
text-align:center;
font-size: 12px;
font-weight: 600; /* decide on this as some stage */
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
.ty-menu__items {
position: absolute;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
width:100%;
text-align: center;
}
.ty-menu__item {
display: inline-block;
padding-right: 50px;
padding-left: 50px;
}
.ty-menu__item a {
padding: 8px 0 6px;
}
a:link, a:visited {
display: block;
width: 100%;
font-weight: light;
color: #494949;
background: transparent;
text-align: center;
text-decoration: none;
text-transform: uppercase;
}
a:hover, a:active {
padding-bottom:7px; /* decide on this as some stage */
background: transparent;
border-bottom: 3px solid #9B9B9B; /* decide on this as some stage */
color: #9B9B9B; /* decide on this as some stage */
}
<div class="menu">
<ul class="ty-menu__items">
<li class="ty-menu__item">home</li>
<li class="ty-menu__item">news</li>
<li class="ty-menu__item">contact</li>
<li class="ty-menu__item">about</li>
</ul>
</div>
http://jsfiddle.net/hp20wcrd/14/
I added padding for the anchor tag and dropped the padding-top on .menu
edit: i also added padding-bottom to the .menu to match your hover selector
.menu {
font-family: Verdana, Arial;
position:fixed;
background:transparent;
width:100%;
top:100px;
left:0;
height:25px; /* decide on this as some stage */
padding: 0;
text-align:center;
font-size: 12px;
font-weight: 600; /* decide on this as some stage */
padding-bottom:7px;
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
.ty-menu__items {
position: absolute;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
width:100%;
text-align: center;
}
.ty-menu__item {
display: inline-block;
padding-right: 50px;
padding-left: 50px;
}
a:link, a:visited {
display: block;
width: 100%;
font-weight: light;
color: #494949;
background: transparent;
text-align: center;
text-decoration: none;
text-transform: uppercase;
}
a {
padding:7px 0px;
}
a:hover, a:active {
background: transparent;
border-bottom: 3px solid #9B9B9B; /* decide on this as some stage */
color: #9B9B9B; /* decide on this as some stage */
}
Put the padding on the a tags, and let those take up the space. The li tags will simply take the size of the a tags.
I put together this jsfiddle (I commented out what wasn't needed): http://jsfiddle.net/g5o9dun9/
.menu {
font-family: Verdana, Arial;
position:fixed;
background:transparent;
width:100%;
top:100px;
left:0;
/* height:25px; */ /* decide on this as some stage */
padding: 0;
text-align:center;
font-size: 12px;
font-weight: 600; /* decide on this as some stage */
/* padding-top: 10px; */ /* decide on this as some stage */
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
.ty-menu__items {
/* position: absolute; */
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
/* width:100%; */
text-align: center;
}
.ty-menu__item {
display: inline-block;
margin:0px 50px;
}
.ty-menu__item a{
padding:20px
}
a:link, a:visited {
display: block;
width: 100%;
font-weight: light;
color: #494949;
background: transparent;
text-align: center;
text-decoration: none;
text-transform: uppercase;
}
a:hover, a:active {
padding-bottom:7px; /* decide on this as some stage */
background: transparent;
border-bottom: 3px solid #9B9B9B; /* decide on this as some stage */
color: #9B9B9B; /* decide on this as some stage */
}

Navbar wont align with content

Im trying to create an HTML page but the content only starts below where the line of the left nav bar finished. i am trying to get the twi to line next to each other. I have tried floating the content but no luck so far
Heres my CSS, any help is greatly appreciated
body
{
margin: 0;
padding: 0;
font-family: arial, verdana, sans-serif;
color: #000;
background-color: #0099CC;
background-image: url(../Images/Background.jpg);
}
#banner
{
background-color: #87CEFA;
border-bottom: 1px solid #333;
text-align: center;
}
#banner h1
{
margin: 0;
padding: .5em;
}
#container
{
margin: 1em 5%;
background-color: #E0FFFF;
background-image: url(../Images/bluebackground.jpg);
background-repeat: repeat-y;
}
#content
{
padding-top: 0.5em;
margin: 0 2em 0 200px;
padding-bottom: 0.5em;
float:left;
}
#navigation {float:left; font-size:0.75em; width:178px; }
#navigation ul {margin:0px; padding:0px;}
#navigation li {list-style: none;}
ul.top-level { background:#1E90FF; }
ul.top-level li {
border-bottom: #fff solid;
border-top: #fff solid;
border-width: 1.5px;
}
#navigation a {
color: #fff;
cursor: pointer;
display:block;
height:25px;
line-height: 25px;
text-indent: 10px;
text-decoration:none;
width:100%;
}
#navigation a:hover{
text-decoration:underline;
}
#navigation li:hover {
background: #f90;
position: relative;
}
ul.sub-level {
display: none;
}
li:hover .sub-level {
background: #0000CD;
border: #fff solid;
border-width: 1px;
display: block;
position: absolute;
left: 168px;
top: 0px;
}
ul.sub-level li {
border: none;
float:left;
width:150px;
}
#nav p
{
margin-top: 0;
}
#footer
{
clear: both;
background-color: #78CEFA;
padding: 1em;
text-align: center;
border-top: 1px solid #333;
font-size:1em;
}
Try changing this:
#content
{
padding-top: 0.5em;
margin: 0 2em 0 200px;
padding-bottom: 0.5em;
float: left;
}
to this:
#content
{
padding-top: 0.5em;
margin: 0 2em 0 200px;
padding-bottom: 0.5em;
overflow: hidden;
}
(That is, change float: left; to overflow: hidden;)

IE9 issues with HTML and CSS

I am having an issue with IE9 and I'm assuming 8 and below as well. below is my .CSS. It works perfectly in Chrome, Safari, and FireFox. I am trying to avoid creating a separate .CSS for IE. Sorry this is my first time posting please let me know if you need more information.
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 0.8em;
background-image: url('../images/white_side.jpg');
}
#container {
width: 1280px;
margin: 0 auto;
margin-top: -10px;
align: center;
}
#masthead {
width: 100%;
height: 170px;
background-image: url('../images/header.jpg');
background-repeat: no-repeat;
}
#content {
float: left;
width: 100%;
background-image: url('../images/background.jpg');
background-repeat: no-repeat;
}
#footer {
text-align: center;
clear: both;
width: 100%;
padding-top: 5px;
padding-bottom: 5px;
border-top: 1px solid #a9a9a9;
border-bottom: 1px solid #a9a9a9;
}
#footer p {
color: #DD7500;
margin-top: 5px;
}
#footer a {
color: #DD7500;
text-decoration: underline;
}
#footer a:hover {
color: black;
text-decoration: none;
}
#menu{
float: left;
list-style-type: none;
margin-top: 95px;
margin-left: -40px;
}
#home{
float: left;
list-style-type: none;
}
#post{
float: left;
list-style-type: none;
}
#input{
float: left;
list-style-type: none;
margin-left: 100px;
margin-top: 15px;
}
#search{
width: 210px;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
}
#deals{
float: left;
list-style-type: none;
margin-left: 90px;
}
#login{
float: left;
list-style-type: none;
}
#registrationul{
float: right;
list-style-type: none;
margin-top: -20px;
}
#welcome{
float: left;
list-style-type: none;
}
#register{
float: left;
list-style-type: none;
}
#loginContainer {
position:relative;
float:right;
font-size:12px;
}
#loginButton {
float:right;
position:relative;
z-index:30;
cursor:pointer;
}
#loginButton img {
color: white;
font-size:24px;
background-image:url(../images/login.jpg) no-repeat ;
}
#loginButton:hover {
background-image:url(../images/loginafter.jpg);
}
#loginBox {
position:absolute;
top: 70px;
right: 0px;
display:none;
z-index:29;
}
#loginForm {
width:248px;
-moz-border-radius:3px 0 3px 3px;
margin-top:-1px;
padding:6px;
}
#loginForm fieldset {
margin:0 0 12px 0;
display:block;
border:0;
padding:0;
}
fieldset#body {
background-color: rgba(0,0,0,0.4);
-moz-border-radius:3px;
padding:10px 13px;
margin:0;
}
#body label {
color: white;
margin:9px 0 0 0;
display:block;
float:left;
}
#loginForm #body fieldset label {
display:block;
float:none;
margin:0 0 6px 0;
}
#loginForm input {
width:92%;
border:1px solid #899caa;
border-radius:3px;
-moz-border-radius:10px;
color:#3a454d;
font-weight:bold;
padding:8px 8px;
box-shadow:inset 0px 1px 3px #bbb;
-webkit-box-shadow:inset 0px 1px 3px #bbb;
-moz-box-shadow:inset 0px 1px 3px #bbb;
font-size:12px;
}
#loginForm #login {
width:auto;
float:left;
color:black;
padding:7px 10px 8px 10px;
box-shadow:none;
-moz-box-shadow:none;
-webkit-box-shadow:none;
margin:0 12px 0 0;
cursor:pointer;
padding:7px 2px 8px 2px; /* IE7 Fix */
}
#loginForm span {
background-color: rgba(0,0,0,0.4);
text-align:center;
display:block;
padding:7px 0 4px 0;
}
#loginForm span a {
color:white;
font-size:12px;
}
#rightpannel{
float: right;
margin-top: 20px;
margin-right: 20px;
width: 600px;
height: 350px;
background: rgba(0, 0, 0, 0.5);
}
#bottompannel{
margin-top: 400px;
margin-left: 20px;
width: 1240px;
height: 200px;
background: rgba(0, 0, 0, 0.5);
}
#leftpannel{
float: left;
margin-top: 20px;
margin-left: 20px;
width: 600px;
height: 350px;
background: rgba(0, 0, 0, 0.5);
}
IE's parser is far less error-tolerant that Webkit (Chrome / Safari) or Gecko (Firefox). Run your code through a validation service. There's a good chance, you forgot to close a tag somewhere which is messing with the markup (I speak from personal experience).
You forgot to clear your floats in the navigation menu...
<ul id="registrationul">
<li id="welcome"></li>
<li id="register"><a id="userButton" href="register.php"><img onmouseout="hideIt(this, 'images/register_plain.jpg')" onmouseover="showIt(this, 'images/register_hover.jpg')" id="imageshow6" alt="" src="images/register_plain.jpg"><em></em></a></li>
</ul>
<div style="clear:both;"></div><!-- clears floated elements (in this case ul#menu and ul#registrationul) -->
You will never get IE to attempt to perform like the other far more modern browsers without a doctype. A doctype is required for modern web pages and, without one, you are in quirks mode. Add this as your first line: <!DOCTYPE html>

Element appearing on different parts of the page when using IE and Firefox

I have an element that is hidden and when you hover over a link it appears. The only problem is that when using IE it appears way to the right (outside of the page) than when it does when you use Firefox (where it renders where I'd like it. How do I fix this? I don't know what part of the CSS was causing the problem so I just copied all of it. I tried to leave off extraneous information as the page is pretty large. Hopefully there's enough here to find out why it's not working right in IE..Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Simple Tabs with CSS & jQuery</title>
<style type="text/css">
.hidden{
background-color:#ccc;
position:absolute;
width:auto;
border:1px black inset;
height:auto;
text-decoration:none;
font-size:14px;
padding: 1em 1em 1em 1em;
border:2px black double;
list-style-type:none;
left:1100px;
top:300px;
margin:1em 1em 1em 1em;
display:none;
}
body {
margin:1em;
padding:0;
height:100%;
background-color:#cbcbcb;
color:#000000;
text-align:center;
font-family:Arial, Helvetica, sans-serif;
border-style: thin;
}
h1 {font-size: 3em; margin: 20px 0;}
#centerColumn {
margin: 0 auto;
padding: 1em;
width: 1000px;
height:1200px;
text-align: left;
vertical-align: bottom;
background-color: #ffffff;
border: 1px solid #999999;}
#header {
border-style: thin;
background-position: center;
margin: -1em -1em 0 -1em;
padding: 0 0 0 0;
height: 15.5em;
background-color: #ffffff;
background-image: url('karrnsmall.jpeg');
background-repeat: repeat-y;
background-attachment: scroll;
}
ul.tabs {
margin: 0;
list-style: none;
height: 32px;
float:left;
width:200px;
padding:0 0 0 0;
}
ul.tabs li {
margin: 0;
padding: 0;
height: 31px;
line-height: 31px;
border: 1px solid #999;
border-left: none;
margin-bottom: -1px;
background: #e0e0e0;
overflow: hidden;
position: relative;
}
ul.tabs li a {
text-decoration: none;
color: #000;
display: block;
font-size: 1.2em;
padding: 0 20px;
border: 1px solid #fff;
outline: none;
}
ul.tabs li a:hover {
background: #eee;
font-size:1.25em;
}
html ul.tabs li.active, html ul.tabs li.active a:hover {
background: #fff;
border-bottom: 1px solid #fff;
}
table {
background-color: black;
border: 1px black solid;
border-collapse: collapse;
}
th {
border: 1px outset silver;
background-color: silver;
color: white;
}
tr {
background-color: white;
margin: 10px;
}
tr.striped {
background-color:silver ;
}
td {
padding: 1px 8px;
}
.tab_container {
border: 1px solid #999;
border-top: none;
clear: both;
float: right;
width: 99%;
background: #fff;
-moz-border-radius-bottomright: 5px;
-khtml-border-radius-bottomright: 5px;
-webkit-border-bottom-right-radius: 5px;
-moz-border-radius-bottomleft: 5px;
-khtml-border-radius-bottomleft: 5px;
-webkit-border-bottom-left-radius: 5px;
}
.tab_content {
padding: 20px;
font-size: 1em;
text-align: left;
</style>
$(document).ready(function(){
$("#button").hover(function(){
$(".hidden").fadeIn(200);
},
function(){
$(".hidden").fadeOut(200);
});
});
</script>
<body>
<div class="hidden"><p>info here
</p></div>
<div id="button">hover here</div></body>
Close your script tag
Add jquery library using this <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> above the jquery code
Add the closing bracket in your css code for .tab_content
Check it and give us feedback
here a live example with corrected all the above http://jsbin.com/ukoba3