Wrapper not to go from top to bottom - css

Ok, I give up - I can't work it out; the wrapper seems to go from the top to the bottom while I want it to leave a gap at the top and bottom so the background appears through. I can't seem to work it out. I am very novice to this. Any help & ideas very welcome.
Code
body {
background: #ffffff url(bgfin.jpg) repeat;
font-family: Tahoma,arial, sans-serif;
font-size:12px;
color:#666666;
height: 100%;
margin:0;
padding:0;
}
#wrapper {
background: url(body-line.png) center repeat-y;
padding-top: 65px;
padding-bottom: 65px;
}
#wrappertop{
background: url(header.png) top center no-repeat;
}
#wrappertbtm{
background: url(footer-new.png) bottom center no-repeat;
padding-bottom: 65px;
}
#container{
width: 959px;
margin: 0 auto;
}
.title{
width: 959px;
height: 56px;
padding: 15px 0px 10px 0px;
font-size: 30px;
color: #bd7821;
}
#navigation{
position: relative;
width: 959px;
height: 40px;
z-index: 2;
}
#navigation li{
float: left;
z-index: 2;
padding: 0px 34px 0px 0px;
}
#navigation li a{
display: inline-block;
position: relative;
outline: none;
height: 28px;
color: #e3e3e3;
z-index: 2;
font-size: 12px;
padding: 15px 0px 0px 0px;
text-decoration: none;
}
#navigation li a:hover, #navigation li#active a{
color: #bd7821;
text-decoration: none;
}
#header{
position: relative;
width: 959px;
height: 196px;
z-index: 1;
margin: 20px 0px 0px 0px;
}

Try:
body { padding:20px 0; }
Or:
#wrapper { margin:20px 0; }
That is shorthand for:
#wrapper {
margin-top:20px;
margin-right:0;
margin-bottom:20px;
margin-left:0;
}
Remember:
Padding is rendered inside of the element
Margin is on the outside
This might help as a reminder:
How to remember in CSS that margin is outside the border, and padding inside

Related

Equal Spacing in Navbar

I've made a "Sticky Navbar using CSS and HTML5 and I have 4 links to place on the navbar but I can't get them to space themselves Equally now before you say this is a duplicate and all, but first of all none of the solutions worked for me and second, I have a logo in the middle of the navbar... Some help Please!heres my website: catsonfire.tk
<style>
article {
margin: auto;
height:auto;
padding-bottom:10px;
}
header {
margin: auto;
width: 100%;
position: relative;
top: 16px;
height: 60px;
}
footer {
background-color: wheat;
align-content: center;
margin: auto;
width:100%
}
nav {
position: relative;
width: 100%;
}
#header_container ul {
margin: 0;
padding: 0px;
list-style-type: none;
text-align: center;
}
#main {
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
#header_container ul li {
display: inline;
width: 25%;
margin:0;
padding:0;
}
#header_container ul li a {
text-decoration: none;
padding: 39px;
color: #fff;
padding: 12px 0 13px 0;
}
#header_container ul li a:hover {
color: #000;
background-color: rgba(0, 0, 0, 0.7);
box-shadow: 1px 1px 1px inset;
-moz-box-shadow: 1px 1px 1px inset;
-webkit-box-shadow: 1px 1px 1px inset;
}
#big {
background: rgba(0, 0, 0, 0.5);
top: 0px;
left: 0px;
right: 0px;
margin: 0px;
width: 100%;
position: absolute;
height: 105px;
}
#header_container {
left: 0;
position: fixed;
width: 100%;
top: 0;
z-index:1000;
height:150px
}
#header {
line-height: 60px;
margin: 0 auto;
}
</style>
Home
About
Your site shows two links, but some thoughts:
#big ul{
display:block;
}
#big li {
display:block;
width:25%;
float:left;
text-align:center;
}
#big li a{
display:inline-block;
}
Makes the li element 1/4th of the width of its parent ul, then centers each a element in those. Add your styles as you want it to look.

Spacing between side by side divs uneditable?

Alright, so I have searched the Internet, I have looked at at the very least twenty different posts on this site, and spent several hours with this issue and either I am blind, or perhaps rustier at this than I thought. I have two divs within a wrapper- the left div is float:left, and I want to space them apart from one another, but when I add padding or margin to the left side of the right div nothing happens. If I manually add space using the code for space, it pushes the paragraph down rather than over. I am at a loss, I tried using inline-block display, I tried floating the right paragraph. The only thing that sort of worked was adding right padding to the left box, but because the content in the left box is centered it then messed up the display of the left box. I uploaded the site contents so you could see what I am talking about, and the stylesheet is pasted below. Any help with this would be greatly appreciated! I usually just use tables and iframes, but I got yelled at for that so I was trying to do this the "right way" (I guess?) for a friend. http://www.djcproductions.net/GSFlook/
/* CSS Reset */
* { margin: 0; padding: 0; }
body {
font-family:Tahoma, Geneva, sans-serif;
background-color:#282828;
}
#container {
width: 1024px;
height: 1200px;
background-image:url(../images/body_bg.jpg);
background-repeat: repeat-x 0 0;
margin: 0 auto;
padding: 0 2px;
}
#header {
width: 1024px;
height: 88px;
}
#nav {
clear: both;
height: 34px;
width: 1024px;
background-image:url(../images/nav_bg.jpg);
}
#nav ul {
float: left;
}
#nav ul li {
display: block;
float: left;
height: 34px;
list-style-type: none;
padding: 0 1px 0 0;
}
#nav ul li a {
color: #ffffff;
display: block;
text-decoration: none;
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
height: 100%;
line-height: 34px;
padding: 0 0 0 18px;
}
#nav li a span {
display: block
float: left;
height: 100%;
padding: 0 18px 0 0;
}
#nav li a:hover, #nav li.active a {
background: url(../images/atab.jpg) no-repeat center;
color: #fff;
cursor: pointer;
text-decoration: none;
}
#homegallery {
width: 1024px;
max-height: 302px;
padding: 37px 0 0 49px;
}
#preview_box{
width: 390px;
height: 236px;
background-image:url(../images/preview_bg.jpg);
background-repeat:no-repeat;
padding: 24px 0 0 0;
}
#preview_shadow{
width: 390px;
height: 236px;
background-image:url(../images/filler.png);
float: left;
padding: 0 0 0 0;
}
.shadow{
-moz-box-shadow: 2px 5px 5px 1px #ccc;
-webkit-box-shadow: 2px 5px 5px 1px #ccc;
box-shadow: 2px 5px 5px 1px #ccc;
}
#content{
padding: 118px 0 0 33px;
}
#scroller{
background-image:url(../images/scroller_bg2.jpg);
background-repeat:no-repeat;
position: relative;
width: 202px; /*marquee width */
height: 267px; /*marquee height */
overflow: hidden;
padding: 0 0 0 0;
float: left;
}
#scroller_content{
width: 98%;
position: absolute;
padding: 20px 0 0 0;
}
#scroll{
font-family:Tahoma, Geneva, sans-serif;
color: #8f8f8f;
}
#scroll li{
padding-top:5px;
list-style-type:none;
}
#company_info{
font-family:Tahoma, Geneva, sans-serif;
color: #000000;
width: 90%;
padding: 0 0 0 0;
}
p {
font-family:Tahoma, Geneva, sans-serif;
text-indent: 30px;
line-height: 25px;
}
The div
<div id="company_info">
Is not floating, but the div to the left of it with id=scroller is.
For a quick solution, you will need to make #company_info:
#company_info {
float: left;
width: 70%;
margin-left: 20px;
}
Also make sure to clear float after those two divs!
You didn't post HTML so I made my own markup, with the parameters you were looking for:
HTML
<div class="container">
<div class="left">
<p>Services</p>
</div>
<div class="right">
<p>Our company</p>
</div>
CSS
p {margin-left: 30px; font-family: Arial, sans-serrif; color: #FFF;}
.container {
margin: 0 auto;
width: 620px;
height: 400px;
padding: 10px;
background: #CCC;
}
.container .left {
margin: 0 auto;
float: left;
width: 300px;
height: 390px;
background: #999;
}
.container .right {
margin: 0 auto;
float: right;
width: 300px;
height: 390px;
background: #666;
}
jsFiddle

CSS ribbon menu causing gap between content and header

I am not sure how to remove the large gap between my header and the beginning of the slideshow. pivotalpixels.com/colusa_fair/ I believe that the problem is something to do with the ribbon navigation but after trying tons of different things I do not know how to move the content up without the recent news moving up to right underneath the navigation bar, which needs to be under the slideshow as it currently is.
css is below
Thanks I appreciate any help!
#charset "utf-8";
/* CSS Document */
body {
margin:0px;
padding:0px;
background-color:#c4c0be;
background-image:url(../images/bluewoodbkgd.jpg);
margin:0px; padding:0px;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
color:#7f7d78;
font-size:13px;
line-height:19px;
}
h1{}
h2 {
margin:0px 0px 10px 0px;
font-size:36px;
font-family:Helvetica, Arial, Sans-serif;
color:#000000;
font-weight: bold;
}
h3{font-size:16px; color: #142b4e; font-weight: bold;}
small {
color:#595856;
font-weight:bold;
font-size:11px;
display:block;
margin-bottom:15px;
}
a {
color:#007de2;
text-decoration:none;
}
a:hover { text-decoration:underline; }
p { margin: 0px 0px 15px 0px; }
#main {
min-height: 500px;
}
#footer {
color:white;
}
.container {
width:994px;
margin:0 auto;
}
#header {
padding-top:10px;
margin: 0;
}
#logo h1 {
margin:0px;
display:block;
text-indent:-9999px;
}
/* Fix up IE6 PNG Support */
img, #logo { behavior: url(scripts/iepngfix.htc); }
#logo {
position: absolute;
top:-25px;
background-image:url(../images/logo_colusa.png);
background-repeat:no-repeat;
margin: 0 0 0 25px;
width:240px;
height:147px;
}
#navigation_container {
width: 994px;
margin: 0;
}
ul#menu{
margin: 0;
top:10px;
position: absolute;
left: 300px;
}
ul#menu li {
list-style: none;
float: left;
display: inline;
}
ul#menu li a {
text-shadow: 0 2px 1px rgba(0,0,0,0.5);
text-decoration: none;
margin: 0 10px 0 0;
color:#FFF;
font: 18px/27px 'ArvoRegular', Arial, sans-serif;
line-height: 28px;
}
ul#menu li a.active, ul#menu li a:hover {
color:#5a8c35;
text-decoration: underline;
margin-top: 2px;
}
.rectangle {
background: #142b4e;
height: 52px;
position: relative;
-moz-box-shadow: 0px 0px 4px rgba(0,0,0,0.55);
-webkit-box-shadow: 0px 0px 4px rgba(0,0,0,0.55);
box-shadow: 0px 0px 4px rgba(0,0,0,0.55);
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
z-index: 500; /* the stack order: foreground */
margin: 35px 0 0 0;
}
.l-triangle-top {
border-color: #142b4e transparent transparent;
border-style:solid;
border-width:50px;
height:0px;
width:0px;
position: relative;
float: left;
top: 0px;
left: -50px;
}
.l-triangle-bottom {
border-color: transparent transparent #142b4e;
border-style:solid;
border-width:50px;
height:0px;
width:0px;
position: relative;
float: left;
top: -49px;
left: -150px;
}
.r-triangle-top {
border-color: #142b4e transparent transparent;
border-style:solid;
border-width:50px;
height:0px;
width:0px;
position: relative;
float: right;
right: -45px;
top: -50px;
}
.r-triangle-bottom {
border-color: transparent transparent #142b4e;
border-style:solid;
border-width:50px;
height:0px;
width:0px;
position: relative;
float: right;
top: -100px;
right: -145px;
}
#sec_navigation_container {
width: 600px;
margin: 0 0 0 255px;
}
ul#menu_sec{
margin: 0;
top:10px;
position: absolute;
left: 110px;
}
ul#menu_sec li {
list-style: none;
float: left;
display: inline;
}
ul#menu_sec li a {
text-shadow: 0 2px 1px rgba(0,0,0,0.5);
text-decoration: none;
margin: 0 10px 0 0;
color:#FFF;
font: 18px/27px 'ArvoRegular', Arial, sans-serif;
line-height: 28px;
}
ul#menu_sec li a.active, ul#menu_sec li a:hover {
color:#ce6536;
text-decoration: underline;
margin-top: 2px;
}
.rectangle_mainsec {
background: #ce6536;
height: 52px;
position: relative;
z-index: 500; /* the stack order: foreground */
margin: 0;
}
.l-triangle-top-sec {
border-color: #ce6536 transparent transparent;
border-style:solid;
border-width:50px;
height:0px;
width:0px;
position: relative;
float: left;
top: 0px;
left: -50px;
}
.l-triangle-bottom-sec {
border-color: transparent transparent #ce6536;
border-style:solid;
border-width:50px;
height:0px;
width:0px;
position: relative;
float: left;
top: -49px;
left: -150px;
}
.r-triangle-top-sec {
border-color: #ce6536 transparent transparent;
border-style:solid;
border-width:50px;
height:0px;
width:0px;
position: relative;
float: right;
right: -125px;
top: -53px;
}
.r-triangle-bottom-sec {
border-color: transparent transparent #ce6536;
border-style:solid;
border-width:50px;
height:0px;
width:0px;
position: relative;
float: right;
top: -100px;
right: -225px;
}
/*
Block-Styles
*/
.block {
margin-bottom:20px;
}
.block_inside {
padding:0 20px;
}
.image_block {
border:1px solid #557f9d;
background-color:#ffffff;
padding:5px;
float:left;
}
.image_block img {
border:1px solid #b5b5b5;
}
#block_slideshow{
overflow: hidden;
width: 100%;
}
.upcoming_events {
float:left;
width:315px;
height: 325px;
margin-left:30px;
padding: 10px;
border: 1px solid #557f9d;
background-color:#ffffff;
}
.upcoming_events h2, #event_items h2{
position: relative;
width: 90%;
font: 24px/27px 'DancingScriptOTRegular', Arial, sans-serif;
padding: 6px 20px 6px 30px;
margin: 4px 10px 10px -31px;
color: #fff;
background-color: #5a8c35;
text-shadow: 0px 1px 2px #7c7c7c;
-webkit-box-shadow: 0px 2px 2px 0px #295e04;
-moz-box-shadow: 0px 2px 2px 0px #295e04;
box-shadow: 0px 2px 1px 0px #295e04;
border: 1px solid #295e04;
}
.upcoming_events h2:before, #event_items h2:before
{
content: ' ';
position: absolute;
width: 0;
height: 0;
right: -2px;
top: 0px;
border-style: solid;
border-width:20px;
border-color: transparent #fff transparent transparent;
}
.upcoming_events h2:after, #event_items h2:after{
content: ' ';
position: absolute;
width: 0;
height: 0;
left: 0px;
top: 100%;
border-width: 5px 10px;
border-style: solid;
border-color: #295e04 #295e04 transparent transparent;
}
.block_content{ padding: 10px;}
#block_recent{overflow:auto;
margin-bottom:20px; }
#event_items {
width:560px;
margin-right:25px;
margin-left: 20px;
float:left;
padding: 10px;
border: 1px solid #557f9d;
background-color:#ffffff;
}
#countdown {
float:right;
width:332px;
height: 175px;
margin-right: 20px;
margin-bottom:20px;
background-image: url(../images/countdown.png);
background-repeat:no-repeat;
}
#block_right {
float:right;
width:332px;
height: 175px;
margin-right: 20px;
margin-bottom: 20px;
background-image: url(../images/countdown.png);
background-repeat:no-repeat;
}
.mini_event_item {
width: 48%;
margin: 5px 0px 10px 10px;
float: left;
}
.date{color: #5a8c35; font-weight: bold;}
.mini_event_item .block_inside {
padding:25px 30px 15px 30px;
}
.mini_event_item .thumbnail { float:left; margin-right:20px; border:1px solid #979390; }
#sponsors{margin: 10px 0px; padding: 10px; height: 95px; background-color: #142b4e; }
.sponsor_item,footer_item{float: left; margin-right: 10px; padding: 10px; height: 70px; background-color: #ffffff; border: 1px solid #000;}
#footer {
font: 18px/27px 'ArvoRegular', Arial, sans-serif;
}
.footer_column {
float:left;
width:300px;
margin-right:10px;
}
#footer .long {
width:670px;
}
#footer h3 {
color:#fff;
text-shadow: 1px 1px 1px #000;
}
#footer h4{
font-size: 16px;
text-shadow: 1px 1px 1px #000;
}
#footer p{ font-size: 12px;
}
ul.industry_links{
padding: 10px;
display: inline;
}
ul.industry_links li {
float:left;
list-style:none;
text-align: center;
}
ul.industry_links li a{
display:block;
width: 135px;
height: 79px;
margin-right: 10px;
padding: 10px;
background-color: #ffffff;
border: 1px solid #039;
text-align: center;
}
.footer_column ul li, .footer_column ul {
list-style:none;
margin:0px;
padding:0px;
font-size: 12px;
}
The r-triangle-top-sec and r-triangle-bottom-sec elements that generate the "ribbon" effect are using the "CSS Triangle Trick" which requires a large border size (50px in this case).
This is causing a lot of extra height due to the invisible border rendering.
One quick fix is to position:absolute these elements.
First, make the container position:relative so the child elements will use it as a positioning reference point
#sec_navigation_container{
position:relative /* Add */
/*...*/
}
Add this to r-triange-top-sec
position: absolute;
top: 0;
right: -50px;
Add this to r-triange-bottom-sec
position: absolute;
top: -50px;
right: -50px;
That should get rid of some of that spacing. Applying this idea to the upper "ribbon" might help as well.
UPDATE
Turns out, the exact same code can be used for the blue ribbon as well. Rinse/repeate the above code but for #navigation_container, l-triangle-top and l-triangle-bottom.
That will move your "slideshow" content flush to the navigation.
You can then add some margin to your #header element such as:
margin-bottom:2em;
to push that "slideshow" back down to a desired separation. (adjust the valid as desired)
note I just eyeballed the placement of the ribbon. Please adjust top/right position as needed for your design
I hope that helps!

HTML Three-page layout column gaps issue

On my project website I'm doing a three column layout, with assistance I received here I was able to get pretty far.
This is my website:
http://younani.com/finalsite/aboutus.html
I am trying to make my three column layout similar to the picture provided, but my problem is the left, right, and center column. When I put a background color on the left column as you can see it creates a gap between the center and the right, same goes for the left.
It looks really unprofessional and not clean, and I don't get why their is a gap in between all columns, and why I can't evenly match them. Same goes with the header. Any ideas why?
Below is my CSS:
#header {text-align: center;}
#container {
width: 960px;
margin: 0 auto;
background-color: #FAFAFA;
color: #003300;
font-family: Arial, Helvetica, sans-serif; background-image:url('backgroundflower5.jpg'); background-repeat: no-repeat; background-position: center; background-size: cover;
}
#h2 {text-align: center;}
#container {
width: 960px;
margin: 0 auto;
}
#container div {
border: 1px solid black;
}
#header {}
#center2 {
float: left;
margin: 10px 0 10px 20px;
min-width: 200px; width: 494px; border-radius:8px;
}
#left,
#center,
#right {
float: left;
margin: 10px 0 10px 20px;
min-width: 200px;
}
#center {font-family: Josefin Slab; background-color: #FFFFFF;
width: 494px; border-radius:8px; text-align: center;
}
.clear {
clear: both;
}
#right { font-family: Josefin Slab; font-weight:bold; border-radius:8px; background-color: #FBEFFB;}
#left a {text-decoration: none;
display: block;
text-align: center;
color: #000000;
font-weight:bold;
border: 3px outset #FFFFFF;
padding: 5px;}
figure{}
#left a:link { background-color: #E6E6E6; }
#left a:visited { background-color: #E6E6E6; }
#left a:hover {border: 3px inset #333333; }
#left ul { list-style-type: none;
margin: 0;
padding-left: 0; }
#footer { text-align: center; font-family: Audimat;
clear: both; width:38%;
border-radius: 8px;
background-color:white;
text-align:center; margin-right:auto;
margin-left:auto; }
You have a 20px margin set for each column. If you don't want that space between them, change this code:
#left, #center, #right {
float: left;
margin: 10px 0 10px 20px;
min-width: 200px;
}
to something like this:
#left, #center, #right {
float: left;
margin: 0;
min-width: 200px;
}

Need to make div and css based pages work in IE 7

I am working on a project where I need to build the pages using div tags and css. The pages look fine in Firefox, Opera, Safari and IE 8, but my client who is using IE7 is complaining of layout problems in IE 7. Can someone take a look and tell me how to fix the code so it will work in all the browsers, especially IE 7? Links and css code is below. Thanks.
Home Page is here: (Code is below)
http://www.danieldicenso.20m.com/citybeams/
/* HOME PAGE CSS CODE */
body {font-size:12px; font-family:"trebuchet MS", verdana, arial, sans-serif; background: #CCCCCC; word-wrap:break-word;}
#wrapper {
text-align: left;
margin: 0px auto;
padding: 0px;
border:0;
width: 1000px;
background: #FFFFFF;
}
#header {
margin: 0 0 15px 0;
background: #ffffff;
}
#side-a {
float: left;
width: 300px;
}
#side-b {
float: right;
width: 300px;
}
#content {
float: left;
width: 400px;
}
#footer {
clear: both;
background: #ffffff;
}
.curvy2 {
position:relative;
width:250px;
color:#000;
margin-top: 1em;
margin-right: auto;
margin-bottom: 1em;
margin-left: auto;
background-color: #99FF99;
background-image: url(bl.gif);
background-repeat: no-repeat;
background-position: left bottom;
}
#ctl, #cbl, #ctr, #cbr {position:absolute; width:20px; height:20px; color:#327734; background:#fff; background-image:url(metalgreen2.jpg); overflow:hidden; font-style:normal; z-index:1;}
#ctl {top:0; left:0;}
#cbl {bottom:0; left:0;}
#ctr {top:0; right:0;}
#cbr {bottom:0; right:0;}
.curvy em b {position:absolute; font-size:150px; font-family:arial; color:#327834; line-height:40px; font-weight:normal;}
#ctl b {left:-8px;}
#ctr b {left:-25px;}
#cbl b {left:-8px; top:-17px;}
#cbr b {left:-25px; top:-17px;}
.curvy p {position:relative; z-index:100; padding:5px 10px;}
.bl {
width: 330px;
background-color: #99ff99;
background-image: url(bl.gif);
background-repeat: no-repeat;
background-position: 0 100%;
}
.br {background: url(br.gif) 100% 100% no-repeat}
.tl {background: url(tl.gif) 0 0 no-repeat}
.tr {background: url(tr.gif) 100% 0 no-repeat; padding:10px}
.clear {font-size: 1px; height: 1px}
.bl2 {
width: 330px;
background-color: #ffffff;
background-image: url;
background-repeat: no-repeat;
background-position: 0 100%;
}
.br2 {background: url100% 100% no-repeat}
.tl2 {background: url 0 0 no-repeat}
.tr2 {background: url 100% 0 no-repeat; padding:10px}
.clear2 {font-size: 1px; height: 1px
}
#navmenu {
position: relative;
left: 16px;
top: 0px;
width: 712px;
height: 22px;
z-index: 2;
background: #99FF99;
text-align: center;
padding: 0px;
}
body,td,th {
color: #000000;
}
a:link {
color: #003333;
}
a:visited {
color: #000066;
}
a:active {
color: #FF0000;
}
--------------------
Sign-up page is here: (CSS Code below)
http://www.danieldicenso.20m.com/citybeams/signuppage.html
/* SIGNUP PAGE CSS CODE */
body {font-size:12px; font-family:"trebuchet MS", verdana, arial, sans-serif; background: #CCCCCC; word-wrap:break-word;}
#wrapper {
text-align: left;
margin: 0px auto;
padding: 0px;
border:0;
width: 1000px;
background: #FFFFFF;
}
#header {
margin: 0 0 15px 0;
background: #ffffff;
}
#side-a {
float: left;
width: 100px;
}
#side-b {
float: right;
width:100px;
}
#content {
float: left;
width: 800px;
}
#footer {
clear: both;
background: #ffffff;
}
.curvy2 {
position:relative;
width:250px;
color:#000;
margin-top: 1em;
margin-right: auto;
margin-bottom: 1em;
margin-left: auto;
background-color: #99FF99;
background-image: url(bl.gif);
background-repeat: no-repeat;
background-position: left bottom;
}
#ctl, #cbl, #ctr, #cbr {position:absolute; width:20px; height:20px; color:#327734; background:#fff; background-image:url(metalgreen2.jpg); overflow:hidden; font-style:normal; z-index:1;}
#ctl {top:0; left:0;}
#cbl {bottom:0; left:0;}
#ctr {top:0; right:0;}
#cbr {bottom:0; right:0;}
.curvy em b {position:absolute; font-size:150px; font-family:arial; color:#327834; line-height:40px; font-weight:normal;}
#ctl b {left:-8px;}
#ctr b {left:-25px;}
#cbl b {left:-8px; top:-17px;}
#cbr b {left:-25px; top:-17px;}
.curvy p {position:relative; z-index:100; padding:5px 10px;}
.bl {
width: 330px;
background-color: #99ff99;
background-image: url(bl.gif);
background-repeat: no-repeat;
background-position: 0 100%;
}
.br {background: url(br.gif) 100% 100% no-repeat}
.tl {background: url(tl.gif) 0 0 no-repeat}
.tr {background: url(tr.gif) 100% 0 no-repeat; padding:10px}
.clear {font-size: 1px; height: 1px}
.bl2 {
width: 330px;
background-color: #ffffff;
background-image: url;
background-repeat: no-repeat;
background-position: 0 100%;
}
.br2 {background: url100% 100% no-repeat}
.tl2 {background: url 0 0 no-repeat}
.tr2 {background: url 100% 0 no-repeat; padding:10px}
.clear2 {font-size: 1px; height: 1px}
#navmenu {
position: relative;
left: 16px;
top: 0px;
width: 712px;
height: 22px;
z-index: 2;
background: #99FF99;
text-align: center;
padding: 0px;
}
.signupfield {
float: none;
width:480px;
color:#000;
margin-top: 1em;
margin-right:1 em;
margin-bottom: 1em;
position: relative;
left: 75px;
background-color: #99FF99;
background-image: url(bl.gif);
background-repeat: no-repeat;
background-position: left bottom;
}
----------------------------------
Reviews page example is here: (CSS code below)
http://www.danieldicenso.20m.com/citybeams/reviewers.html
/* REVIEW PAGE CSS CODE */
body {font-size:12px; font-family:"trebuchet MS", verdana, arial, sans-serif; background: #CCCCCC; word-wrap:break-word;}
#wrapper {
text-align: left;
margin: 0px auto;
padding: 0px;
border:0;
width: 1000px;
background: #FFFFFF;
}
#header {
margin: 0 0 15px 0;
background: #ffffff;
}
#side-a {
float: left;
width: 50px;
}
#side-b {
float: right;
width: 200px;
}
#content {
float: left;
width: 750px;
}
#footer {
clear: both;
background: #ffffff;
}
.curvy2 {
position:relative;
width:250px;
color:#000;
margin-top: 1em;
margin-right: auto;
margin-bottom: 1em;
margin-left: auto;
background-color: #99FF99;
background-image: url(bl.gif);
background-repeat: no-repeat;
background-position: left bottom;
}
#ctl, #cbl, #ctr, #cbr {position:absolute; width:20px; height:20px; color:#327734; background:#fff; background-image:url(metalgreen2.jpg); overflow:hidden; font-style:normal; z-index:1;}
#ctl {top:0; left:0;}
#cbl {bottom:0; left:0;}
#ctr {top:0; right:0;}
#cbr {bottom:0; right:0;}
.curvy em b {position:absolute; font-size:150px; font-family:arial; color:#327834; line-height:40px; font-weight:normal;}
#ctl b {left:-8px;}
#ctr b {left:-25px;}
#cbl b {left:-8px; top:-17px;}
#cbr b {left:-25px; top:-17px;}
.curvy p {position:relative; z-index:100; padding:5px 10px;}
.bl {
width: 330px;
background-color: #99ff99;
background-image: url(bl.gif);
background-repeat: no-repeat;
background-position: 0 100%;
}
.br {background: url(br.gif) 100% 100% no-repeat}
.tl {background: url(tl.gif) 0 0 no-repeat}
.tr {background: url(tr.gif) 100% 0 no-repeat; padding:10px}
.clear {font-size: 1px; height: 1px}
.bl2 {
width: 330px;
background-color: #ffffff;
background-image: url;
background-repeat: no-repeat;
background-position: 0 100%;
}
.br2 {background: url100% 100% no-repeat}
.tl2 {background: url 0 0 no-repeat}
.tr2 {background: url 100% 0 no-repeat; padding:10px}
.clear2 {font-size: 1px; height: 1px}
#navmenu {
position: relative;
left: 16px;
top: 0px;
width: 712px;
height: 22px;
z-index: 2;
background: #99FF99;
text-align: center;
padding: 0px;
}
.signupfield {
position:relative;
width:480px;
color:#000;
margin-top: 1em;
margin-right: auto;
margin-bottom: 1em;
margin-left: -120px;
background-color: #99FF99;
background-image: url(bl.gif);
background-repeat: no-repeat;
background-position: left bottom;
}
body,td,th {
color: #000000;
}
a:link {
color: #003333;
}
a:visited {
color: #000066;
}
a:active {
color: #FF0000;
}
#selectionbar {
position: relative;
left: 0px;
top: 0px;
width: 750px;
height: 22px;
z-index: 2;
background: #ffffff;
padding: 0px;
}
#selectionbartwo {
position: relative;
left: 0px;
top: -10px;
width: 750px;
height: 22px;
z-index: 2;
background: #ffffff;
padding: 0px;
}
#selectionbarthree {
position: relative;
left: 0px;
top: -10px;
width: 750px;
height: 22px;
z-index: 2;
background: #ffffff;
padding: 0px;
}
#dividerline {
position: relative;
left: 0px;
top: -4px;
width: 750px;
height: 1px;
z-index: 2;
background: #ffffff;
padding: 0px;
}
#results {
position: relative;
left: 55px;
top: -14px;
width: 600px;
height: 1px;
z-index: 2;
background: #ffffff;
padding: 0px;
}
If default margins and padding are indeed your problem as Ryan so helpfully suggested, you can force every element to have the same base margin and padding with the following statement:
* {
margin: 0px;
padding: 0px;
}
Note that this will probably break your layout in the other browsers too, but at least they'll all be broken the exact same way.
IE7 has different defaults and behaviour for margin and padding than the other browsers. A quick viewing of the page in IE7 suggests that is likely where the majority of your problems are.
You might try using padding to offset navmenu instead of using position:relative and left.
Don't use
*{margin: 0px;padding: 0px;}
U dont want to rewrite your whole site for html elements who actually need the default value.
use css reset
Use xhtml and css valid code
And fix common bugs
You can force your IE8 to render pages like IE7 and check the layout yourself.
Read that: http://blogs.msdn.com/ie/archive/2008/08/27/introducing-compatibility-view.aspx
Use:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
but only for debug
To test how your page looks in IE7 without meta-tag tricks or similar, you can download a virtual sandboxed browser from here: http://www.xenocode.com/browsers/ Great for testing web applications.

Resources