girlstar
11-26-2007, 04:51 PM
Hey all,
I am, for the first time ever, trying to code a design with no tables. I am a long time user of tables, so this is really killing me. And the different results on different browsers kills it even more. I have been working on this for a day, and been looking at plenty of tutorials.. ones that use display: table, ones that use absolute positioning, and ones that use float.
Here is what my site currently looks like:
http://www.girlstar.org/
Under firefox, it looks like I want (minus the coloured borders I have added in to distinguish the boundaries of the divs). Under IE, the content div and sidebar div do not line up together. Can anyone help me?
Here's my stylesheet.. thanks in advance to anyone.
html, body {
background: #e7346e;
padding: 0px;
margin: 0px;
font-family: Verdana, Arial, Sans-Serif;
font-size: 12px;
height: 100%;
}
#header-container {
background: #e7346e url('images/bg.jpg') repeat-x;
width: 100%;
height: 91px;
position: relative;
margin: 0px;
}
#header {
margin-left: auto;
margin-right: auto;
background: url('images/girlstar.png') no-repeat;
padding: 0px;
width: 800px;
height: 91px;
text-align: right;
color: #ffffff;
font-weight: bold;
}
#header a {
font-weight: bold;
color: #ffffff;
text-decoration: underline;
}
#page {
background: #e7346e;
margin-left: auto;
margin-right: auto;
width: 800px;
min-height: 100%;
height: auto;
padding: 0px;
position: relative;
border: 2px solid blue;
display: table;
}
#content {
background: #ffffff url('images/main-back.jpg') repeat-y;
font-size: 12px;
text-align: justify;
padding: 30px;
margin: 0px;
width: 490px;
position: relative;
min-height: 100%;
height: auto;
display: table-cell;
border: 2px solid red;
}
#content h2 {
font-size: 16px;
margin: 0px;
}
#content h3 {
font-size: 11px;
color: #ababab;
margin: 0px;
}
#content a {
font-weight: bold;
color: #0094de;
text-decoration: none;
}
#sidebar {
background: #e7346e;
font-size: 12px;
padding-left: 25px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 30px;
margin: 0px;
width: 220px;
position: relative;
display: table-cell;
top: 0;
left: 550px;
border: 2px solid green;
}
#footer-container {
background: #0094de;
width: 100%;
margin: 0px;
border: 2px solid yellow;
}
#footer {
background: url('images/girl.jpg') no-repeat right;
margin-left: auto;
margin-right: auto;
padding: 10px;
width: 780px;
color: #ffffff;
min-height: 300px;
}
#line-footer {
background: #e7346e url('images/bg.jpg') repeat-x;
width: 100%;
padding: 0px;
margin: 0px;
height: 30px;
}
#inourbag {
background: url('images/inourbag.png') no-repeat;
width: 225px;
height: 282px;
}
#inourbag-contents {
margin-left: auto;
margin-right: auto;
text-align: center;
position: absolute;
width: 175px;
padding: 25px;
padding-top: 105px;
line-height: 1.5em;
}
#about {
background: url('images/creditcard.png') no-repeat;
width: 225px;
height: 141px;
}
#about-contents {
margin-left: auto;
margin-right: auto;
text-align: left;
position: absolute;
width: 185px;
padding: 20px;
padding-top: 14px;
font-size: 11px;
color: #787878;
}
#inourbag a {
font-weight: bold;
color: #ffffff;
text-decoration: underline;
}
#inourbag img {
border: 2px solid #e6336d;
}
#sidebar .widgettitle {
}
#sidebar ul, #sidebar li {
list-style-type: none;
color: #ffffff;
margin-left: 0px;
padding-left: 0px;
}
p img {
padding: 0;
max-width: 100%;
}
img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}
img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}
img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}
.alignright {
float: right;
}
.alignleft {
float: left
}
/* Begin Form Elements */
select {
width: 130px;
}
#commentform input {
width: 170px;
padding: 2px;
margin: 5px 5px 1px 0;
}
#commentform textarea {
width: 100%;
padding: 2px;
}
#commentform #submit {
margin: 0;
float: right;
}
/* End Form Elements */
/* Begin Comments*/
.alt {
margin: 0;
padding: 10px;
}
.commentlist {
padding: 0;
text-align: justify;
}
.commentlist li {
margin: 15px 0 3px;
padding: 5px 10px 3px;
list-style: none;
}
.commentlist p {
margin: 10px 5px 10px 0;
}
#commentform p {
margin: 5px 0;
}
.nocomments {
text-align: center;
margin: 0;
padding: 0;
}
.commentmetadata {
margin: 0;
display: block;
}
/* End Comments */
a img {
border: none;
}
I am, for the first time ever, trying to code a design with no tables. I am a long time user of tables, so this is really killing me. And the different results on different browsers kills it even more. I have been working on this for a day, and been looking at plenty of tutorials.. ones that use display: table, ones that use absolute positioning, and ones that use float.
Here is what my site currently looks like:
http://www.girlstar.org/
Under firefox, it looks like I want (minus the coloured borders I have added in to distinguish the boundaries of the divs). Under IE, the content div and sidebar div do not line up together. Can anyone help me?
Here's my stylesheet.. thanks in advance to anyone.
html, body {
background: #e7346e;
padding: 0px;
margin: 0px;
font-family: Verdana, Arial, Sans-Serif;
font-size: 12px;
height: 100%;
}
#header-container {
background: #e7346e url('images/bg.jpg') repeat-x;
width: 100%;
height: 91px;
position: relative;
margin: 0px;
}
#header {
margin-left: auto;
margin-right: auto;
background: url('images/girlstar.png') no-repeat;
padding: 0px;
width: 800px;
height: 91px;
text-align: right;
color: #ffffff;
font-weight: bold;
}
#header a {
font-weight: bold;
color: #ffffff;
text-decoration: underline;
}
#page {
background: #e7346e;
margin-left: auto;
margin-right: auto;
width: 800px;
min-height: 100%;
height: auto;
padding: 0px;
position: relative;
border: 2px solid blue;
display: table;
}
#content {
background: #ffffff url('images/main-back.jpg') repeat-y;
font-size: 12px;
text-align: justify;
padding: 30px;
margin: 0px;
width: 490px;
position: relative;
min-height: 100%;
height: auto;
display: table-cell;
border: 2px solid red;
}
#content h2 {
font-size: 16px;
margin: 0px;
}
#content h3 {
font-size: 11px;
color: #ababab;
margin: 0px;
}
#content a {
font-weight: bold;
color: #0094de;
text-decoration: none;
}
#sidebar {
background: #e7346e;
font-size: 12px;
padding-left: 25px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 30px;
margin: 0px;
width: 220px;
position: relative;
display: table-cell;
top: 0;
left: 550px;
border: 2px solid green;
}
#footer-container {
background: #0094de;
width: 100%;
margin: 0px;
border: 2px solid yellow;
}
#footer {
background: url('images/girl.jpg') no-repeat right;
margin-left: auto;
margin-right: auto;
padding: 10px;
width: 780px;
color: #ffffff;
min-height: 300px;
}
#line-footer {
background: #e7346e url('images/bg.jpg') repeat-x;
width: 100%;
padding: 0px;
margin: 0px;
height: 30px;
}
#inourbag {
background: url('images/inourbag.png') no-repeat;
width: 225px;
height: 282px;
}
#inourbag-contents {
margin-left: auto;
margin-right: auto;
text-align: center;
position: absolute;
width: 175px;
padding: 25px;
padding-top: 105px;
line-height: 1.5em;
}
#about {
background: url('images/creditcard.png') no-repeat;
width: 225px;
height: 141px;
}
#about-contents {
margin-left: auto;
margin-right: auto;
text-align: left;
position: absolute;
width: 185px;
padding: 20px;
padding-top: 14px;
font-size: 11px;
color: #787878;
}
#inourbag a {
font-weight: bold;
color: #ffffff;
text-decoration: underline;
}
#inourbag img {
border: 2px solid #e6336d;
}
#sidebar .widgettitle {
}
#sidebar ul, #sidebar li {
list-style-type: none;
color: #ffffff;
margin-left: 0px;
padding-left: 0px;
}
p img {
padding: 0;
max-width: 100%;
}
img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}
img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}
img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}
.alignright {
float: right;
}
.alignleft {
float: left
}
/* Begin Form Elements */
select {
width: 130px;
}
#commentform input {
width: 170px;
padding: 2px;
margin: 5px 5px 1px 0;
}
#commentform textarea {
width: 100%;
padding: 2px;
}
#commentform #submit {
margin: 0;
float: right;
}
/* End Form Elements */
/* Begin Comments*/
.alt {
margin: 0;
padding: 10px;
}
.commentlist {
padding: 0;
text-align: justify;
}
.commentlist li {
margin: 15px 0 3px;
padding: 5px 10px 3px;
list-style: none;
}
.commentlist p {
margin: 10px 5px 10px 0;
}
#commentform p {
margin: 5px 0;
}
.nocomments {
text-align: center;
margin: 0;
padding: 0;
}
.commentmetadata {
margin: 0;
display: block;
}
/* End Comments */
a img {
border: none;
}