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
Related
I'm building a website on Github page and I am trying to change color of footer.
As you can see, I made with class "footer" .
On CSS, I put background-color property and set as #000000.
But, I still can't see background color with black on desktop.( I can see on mobile page because I set media query)
The Code is below.
#media screen and (min-width: 1000px) {
html, body{
font-family: "Comfortaa";
}
.header-logo{
float: left;
padding: 10px 30px;
}
.header li:hover{
border-bottom: 2px solid #24ABE2;
}
.header a{
float:left;
display:block;
color:black;
}
.header-link li{
float: left;
padding: 5px 60px;
font-size: 20px;
color:#24ABE2;
}
/* Dropdown Button */
.droplist{
border: none;
}
/* The container <div> - needed to position the dropdown content */
.dropdown {
position: relative;
display: inline-block;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute;
background-color: white;
min-width: 240px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 20;
margin-top: 29px;
height: 210px;
color:#24ABE2;
}
/* Links inside the dropdown */
.dropdown-content a {
color: #24ABE2;
padding: 12px 16px;
text-decoration: none;
display: block;
z-index: 20;
}
/* Change color of dropdown links on hover */
.dropdown-content a:hover {
border-bottom: 2px solid #24ABE2;
}
/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
display: block;
}
/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {
background-color: white;
}
.footer-logo{
float: left;
padding: 15px 20px;
width: 300px;
height: auto;
margin-left: 30px;
margin-top: 20px;
}
.footer-list{
margin-top:10px;
font-size: 20px;
color: #ccfbff;
float: right;
padding: 2px 8px;
margin-right: 40px;
}
.footer-list li{
padding: 10px;
}
}
#media screen and (max-width: 1000px) {
html, body{
font-family: Nunito;
}
.header-logo{
text-align:center;
margin-left:20px;
padding: 10px 30px;
}
.header li{
display:none;
}
.header-link{
display:none;
}
.footer-logo{
padding: 15px 10px;
width: 300px;
height: 90px;
margin:auto;
text-align:center;
}
.footer-logo img{
width: 300px;
height: auto;
margin:auto;
text-align:center;
}
.footer-list{
display:block;
margin:auto;
font-size: 20px;
color: #ccfbff;
padding: 2px 8px;
text-align:center;
}
.footer-list li{
margin:auto;
padding: 5px;
font-size:20px;
text-align:center;
}
}
/* CSS for default design */
html { scroll-behavior: smooth; }
html, body{
height: 100%;
width: 100%;
margin: 0px 0px 0px 0px;
z-index:-10;
}
/* Settings of a tag for whole page*/
a:link {
text-decoration: none;
cursor: pointer;
}
a:visited {
text-decoration: none;
cursor: pointer;
}
a:hover {
text-decoration: none;
cursor: pointer;
}
a:active {
text-decoration: none;
cursor: pointer;
}
.header {
border-bottom:2px solid #0E76BC;
background-color: white;
height: 60px;
position: fixed;
top: 0px;
bottom: 0px;
right: 0px;
left: 0px;
opacity: 90%;
margin: 0px 0px 0px 0px;
z-index:10;
}
.header-logo{
width: 300px;
height: auto;
}
li{
list-style: none;
}
.footer{
height: auto;
background-color: #000000 !important;
width: 100%;
margin: 0px 0px 0px 0px;
}
.footer a:link {
color: #ccfbff;
}
.footer a:visited {
color: #ccfbff;
}
.footer a:hover {
color: #ccfbff;
}
.footer a:active {
color: #ccfbff;
}
<div class="footer">
<img src="https://i.ibb.co/p4LvvdH/Copy-of-LOGO-White.png" alt="SLED Logo" class="footer-logo" />
<div class="footer-list">
<ul>
<li>Back to Top</li>
<li>Instagram</li>
<li>Facebook</li>
<li>Jcbms-sled-team#mail.fcboe.org</li>
<li>J.C. Booth Middle School</li>
<li>Fayette County Public Schools</li>
</ul>
</div>
</div>
Whenever we give float property on child item then parents give automatically own height to 0, so please put it:
.footer:before,
.footer:after
{
clear: both;
display: block;
content: '';
}
The reason is because you set your footer height to auto without defining a minimum height. To solve this just put min-height: 50vh; to your .footer class. Of course you can change 50vh to whatever minimum height you want.
try something like this
.footer
{
min-height: 100%;
background-color: #000000 !important;
width: 100%;
margin: 0px 0px 0px 0px;
}
set min-height: 100% instead of height:auto from .footer class
.navbar {
overflow: hidden;
background-color: antiquewhite;
position: absolute;
top: 0;
width: 100%;
}
.navbar a {
float: right;
display: block;
color: Black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 22px;
}
.container {
width: 80%;
background: aqua;
margin: auto;
padding: 10px;
}
.main {
padding: 16px;
margin-top: 30px;
width:1000px;
margin-left:15px;
}
#navbarItem {
list-style-type: none;
margin: 0;
padding:0;
}
li a:hover {
background-color: #b6ff00;
color: white;
}
.main{
padding-top:100px;
padding-left:100px;
padding-right:100px;
border: 1px solid green;
}
.navbar2{
width:15%;
float:left;
border: 2px solid red;
}
How can I put two divs (.main and .navbar2) together in container div ? I want to put main and navbar div side by side in container. I will make the navbar fixed, so that as I scroll down it will stay in its position. Later I might add 3rd div to the right of website.
HTML:
<div id="wrapper">
<div id="leftcolumn">
Left
</div>
<div id="rightcolumn">
Right
</div>
</div>
CSS:
body {
background-color: #444;
margin: 0;
}
#wrapper {
width: 1005px;
margin: 0 auto;
}
#leftcolumn, #rightcolumn {
border: 1px solid white;
float: left;
min-height: 450px;
color: white;
}
#leftcolumn {
width: 250px;
background-color: #111;
}
#rightcolumn {
width: 750px;
background-color: #777;
}
I'm trying to create a hover effect that will change the color of the image to blue, as the mouse hovers it. I've already created a class for the images and styled it in my css but its still not working. I've also tried changing z-indexes but to no avail.
#import url(http://fonts.googleapis.com/css?family=Black+Ops+One:400,700); /*--- Header --*/
#import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700); /*--- Navigation --*/
*
{
margin: 0;
border: 0;
padding: 0;
}
body
{
background-image: url('../Images/background.png');
background-repeat: repeat-x;
}
.clearfix
{
clear:both;
}
#wrapper
{
margin: 0 auto;
max-width: 1120px;
overflow: auto;
border: 1px solid black;
}
#main_header
{
width: 100%;
font-family: 'Black Ops One', sans-serif;
background-color: black;
border: 1px solid black;
color: white;
}
#main_header h1
{
float: left;
font-size: 380%;
margin: -10% 0 0 2%;
}
#callout
{
margin: 50px 20px 0 0;
}
#callout h2{
text-align: right;
color: white;
}
#callout p{
text-align: right;
padding: 0%;
color: grey;
font-size: 20px;
margin-bottom: 3px;
}
#nav_menu
{
width: 100%;
height: 10%;
background-color: white;
}
#nav_menu li
{
display: inline-block;
margin: 20px 20px 20px 63px;
font-family: 'Open Sans', sans-serif;
font-size: 20px;
font-weight: bold;
}
#nav_menu li a
{
text-decoration: none;
color: black;
}
#nav_menu li a:hover
{
color: grey;
}
#content_area
{
width: 100%;
margin: 10px;
}
.sub-menu
{
position: absolute;
background-color: white;
list-style-type: none;
width: 5px;
display: none;
z-index: 60;
border-radius: 15px;
}
#nav_menu .sub-menu li a
{
color: black;
}
#nav_menu li:hover .sub-menu
{
display: block;
}
#nav_menu li .sub-menu
{
width: 16.5%;
}
#nav_menu li .sub-menu li
{
display: block;
margin-left: 20px;
}
.sub-menu li:hover
{
color: green;
background-color: yellow;
}
/*--- Start Image Slider --*/
.slider{
max-width: 1100px;
box-shadow: 0px 0px 0px 0 rgba(0, 0, 0, 0.07);
}
.slider1 img{
width: 100%;
margin: 0 auto;
}
.slider .bx-wrapper .bx-controls-direction a{
outline: 0 none;
position: absolute;
text-indent: -9999px;
top: 40%;
height: 71px;
width: 40px;
transition: all 0.7s;
}
.slider .bx-wrapper:hover .bx-controls-direction a{
}
.slider .bx-wrapper .bx-prev{
background: url("../Images/arrow_left.png") no-repeat 7px 9px;
left: 0px;
}
.slider .bx-wrapper .bx-prev:hover{
background: url("../Images/arrow_left.png") no-repeat 8px 15px;
}
.slider .bx-wrapper .bx-next{
background: url("../Images/arrow_right.png") no-repeat 10px 12px;
right: 0px;
}
.slider .bx-wrapper .bx-next:hover{
background: url("../Images/arrow_right.png") no-repeat 10px 17px;
}
/*--- End Image Slider --*/
.one-third img{
text-align: center;
max-width: 100%;
height: auto;
opacity: 0.9;
}
.border_section p{
font-family: 'Lato', sans-serif;
padding: 2%;
color: white;
text-align: justify;
}
.border_section h3
{
font-family: 'Open Sans', sans-serif;
text-align: center;
color: white;
text-transform: uppercase;
letter-spacing: 1%;
}
.border_section
{
border: 1px solid black;
background-color: black;
}
.one-third {
width: 27.35%;
float: left;
margin: 2% 0 3% 4%;
text-align: center;
background-color: white;
}
.guitarLogo img:hover
{
color: yellow;
background-color: blue;
}
footer{
font-family: 'Open Sans', sans-serif;
font-weight: bold;
text-align: center;
width: 100%;
height: 6%;
background-color: black;
overflow: auto;
}
footer p
{
margin-top: 1%;
color: white;
}
<div class="border_section">
<img class="guitarLogo" src="../Images/Guitar Brands/ibanezLogo.jpg" runat="server"/>
</div>
</section>
<section class="one-third">
<div class="border_section">
<img class="guitarLogo" src="../Images/Guitar Brands/fenderLogo.jpg" runat="server"/>
</div>
</section>
<section class="one-third">
<div class="border_section">
<img class="guitarLogo" src="../Images/Guitar Brands/gibsonLogo.jpg" runat="server"/>
</div>
</section>
<section class="one-third">
<div class="border_section">
<img class="guitarLogo" src="../Images/Guitar Brands/prsLogo.jpg" runat="server"/>
</div>
</section>
<section class="one-third">
<div class="border_section">
<img class="guitarLogo" src="../Images/Guitar Brands/ernieballLogo.jpg" runat="server"/>
</div>
</section>
<section class="one-third">
<div class="border_section">
<img class="guitarLogo" src="../Images/Guitar Brands/espLogo.jpg" runat="server"/>
</div>
</section>
If you don't want to affect other elements and change the background color of div element around your images, then create new class like myHover and add existing CSS to it, like:
HTML:
<div class="border_section myHover">
<img class="guitarLogo" src="../Images/Guitar Brands/fenderLogo.jpg" runat="server" />
</div>
CSS:
.myHover:hover {
color: yellow;
background-color: blue;
}
JSFiddle example: https://jsfiddle.net/59drat5e/4/
The selector would be img.guitarLogo:hover
But setting a background-color for an image will only affect the visible part around the image (if there is ANY), and color would only affect text (and there isn't any), so you will problably see no effect, even if it works.
It looks like that you are targeting the wrong element. The background-color:blue will only be visible if the image is transparent, otherwise most of the time the image will just overlap any background color for it to be visible.
What you should be doing is targetting the container element as shown below.
.border_section:hover
{
color: yellow;
background-color: blue;
}
DEMO
If you have images with transparencies or still if you want to set the background-color of the img just for the sake of it, then maybe you should write the rule as below.
img.guitarLogo:hover
{
color: yellow;
background-color: blue;
}
Try this code in your css
.guitarLogo:hover {
background: blue;
}
you can also overlay background color to image
.overlay {
position:relative;
width:400px;
height:auto;
}
.overlay img {
width:100%;
vertical-align:top;
}
.overlay:after {
content:'';
position:absolute;
width:100%;
height:100%;
top:0; left:0;
background:red;
opacity:0;
transition: all 0.5s;
-webkit-transition: all 0.5s;
}
.overlay:hover:after {
opacity:1;
}
<div class="overlay">
<img src="https://www.google.co.in/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" alt="" />
</div>
Your CSS:
.guitarLogo img:hover {
color: yellow;
background-color: blue;
}
Is incorrect, because the .guitarLogo already targets the <img> element - no need for img:hover.
Also, that isn't going to work, because there is no way you can set z-index to background only - it's possible only for elements.
The way to do what you want is to register :hover on parent container and in it by using pseudo element :before / :after as the foreground you can get the desired effect.
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;)
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>