Forum Moderators: not2easy

Message Too Old, No Replies

can't center page - can't add color border to sides of page

         

raindew01

9:47 pm on Mar 22, 2009 (gmt 0)

10+ Year Member



Hi there,
I'm really new to CSS, but have been researching it and trying it out for days.

I can't get my pages to center. I thought the div.main would, but it doesn't.

I also can't get a color border down the left and right of the page; when it appears, it stops at the very top. I would really appreciate any help!

body {
font-family: Arial,Helvetica,sans-serif;
font-size: medium;
text-align:left;
border-left: 30px solid #ffcc33;
border-right: 30px solid #ffcc33;
}
h1, h2, h3, h4, h5 {
font-family: Arial,Verdana,Helvetica,sans-serif;
}
h1 {
color: #000000;
font-size: 35px;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 20px;
}
h4 {
font-size: 17px;
}
h5 {
font-size: 12px;
}
a:link {
text-decoration: none;
color: #6fa408;
}
a:visited {
text-decoration: none;
color: #629205;
}
a:hover {
text-decoration: none;
color: #f5c439;
}
a:active {
text-decoration: none;
color: #f5c439;
}
.green-times {
font-family: "times new roman," times,serif;
color: #6fa408;
}
div.content {
position: absolute;
margin-top: 200px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
width: 800px;
font-family: Arial, Verdana, sans-serif;
}
div.header {
position: absolute;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
padding: 0px;
width: 800px;
height: 150px;
font-family: "Times New Roman",Times,serif;
color: #6fa408;
font-weight: bold;
text-align: right;
}
div.menu{
position: absolute;
margin-top: 170px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
font-family: Arial, Verdana, sans-serif;
color: #6fa408;
font-weight: bold;
text-align: right;
}
div.footer{
position: absolute;
margin-top: 1600px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
clear: both;
height: 5%;
font-size: xx-small;
font-family: Arial, Verdana, sans-serif;
}
.center {
text-align: center;
}
.center-table {
border-left: 30px solid #ffcc33;
border-right: 30px solid #ffcc33;
width: 100%;
margin-right: auto;
margin-left: auto;
text-align: left;

}
table#body-table {width:80%; margin-left:5%; margin-right:15%; border-left: 30px solid #ffcc33;
border-right: 30px solid #ffcc33;
}
.green-arial {
color: #6fa408;
font-family: Arial,Helvetica,sans-serif;
}
div.main {
margin: 0, auto;
text-align: left;
}

raindew01

2:32 pm on Mar 31, 2009 (gmt 0)

10+ Year Member



I figured out what was causing the bottom photo to move down through the footer line and the content space--it was the class floatRight that I had. But i don't understand why. I had:

<img alt="image (142K)" src="image.jpg" height="300" width="400" class="floatRight" style="padding-bottom: 1em;">

and in the stylesheet:
}
.floatRight {
float: right;
margin: 4px;
}

raindew01

7:59 pm on Mar 31, 2009 (gmt 0)

10+ Year Member



But I need the image on the right....how do I get it to be positioned on the right, but not mess up the footer? and why does it mess up the footer?

Also, I'm trying to do blockquotes with quotation marks. The CSS I found doesn't work in IE, so I'm using CSS plus images. BUT though I can get the quotes there using images, on this page with two photos and multiple quotes, the top two quotes' opening quotation marks are hidden behind the photo on the left. I thought doing float right for the quotes would fix that, but it didn't. Would you know how?

raindew01

8:04 pm on Mar 31, 2009 (gmt 0)

10+ Year Member



Hm. Not only are the opening quotation marks mostly hidden by the photo, they're on the far left where the photo is, instead of next to the quotations on the right....

Also--can you have two classes for the same item? I mean:
<blockquote class="withquote"> <blockquote class="class="floatRight">
<p class="withunquote">
(two classes for the same blockquote)

raindew01

8:12 pm on Mar 31, 2009 (gmt 0)

10+ Year Member



Oh. (ahem.) I think I see why the blockquote images are always on the far left:
background-position:top left;
in my stylesheet. I just don't know how to make it be around the actual quote. Is there a way to position it so that it sticks to the quote?

raindew01

2:52 pm on Apr 2, 2009 (gmt 0)

10+ Year Member



Also, consistently, every time I try to center an image doing this:

margin: 0 auto;

it does not center or move the image. The only thing that has is putting html in <center></center> which I'm pretty sure I'm not supposed to do.

Would anyone know why my images aren't centering?

raindew01

3:49 pm on Apr 2, 2009 (gmt 0)

10+ Year Member



Another page had an image going through the footer, so I reread your notes again, and redid the padding for the content (I tried redoing the padding for the footer, too, but that didn't work) and it worked. thank you!
This 66 message thread spans 3 pages: 66