PDA

View Full Version : ALA style 2 Column CSS not rendering so well?


bradyj
09-19-2003, 02:04 AM
I'm trying to build the two column layout with <div> such as what you see on:
http://www.alistapart.com/stories/seo/

However, I can't get the two div's to 1) make a background color on the right side that sticks without playing with the left background (which needs to be transparent) 2) A line that seperates the two in the middle seems to either overlap too much on the right or left side depending on the browser.
http://www.dotfive.com/angie/index2.html

Screen shots would be helpful as well if you can!!

CSS is:
.leftstuff {
float:left;
width:67%;
padding-right: 15px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
color: #333333;
border-right-width: 1px;
border-right-style: dotted;
border-right-color: #999999;
}
.rightstuff {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
padding-left: 10px;
list-style-type: disc;
background-color: #666666;
}


XHTML is (it was long, but I wanted to show the structure, so I deleted some):

<div class="leftstuff">
<h2>Serving Families &amp; children in Solano, Napa and Yolo Counties</h2>
<h1>Mission:</h1>
<p>The mission of the Children's Nurturing Project is to promote
healthy parent-child relationships through support services and education.
Children will develop socially, physically, and emotionally through
nurturing and personal growth, leaving a legacy of hope for future
generations.</p>
</div>
<div class="rightstuff">
<h3>Nurturing Specialists:</h3>
<ul>
<li>home visiting services</li>
<li>parent education &amp; support</li>
<li>case management</li>
<li>prenatal education</li>
<li>group facilitation</li>
<li>parenting skills assessments</li>
<li>breastfeeding support</li>
<li>family conferencing</li>
</ul>


Yeah, way too many lists, ya think? I also have a container div for that code I listed which is absolutely positioned, and I imagine causing some problems as well... Thank you!!!:)

Skyzyx
09-19-2003, 05:47 AM
As far as lists go, I know that one browser (Gecko or IE, I can't remember) uses margin for the left-side spacing, while the other browser uses padding. You will almost definitely have to tweak with those values.

http://www.skyzyx.com/temp/bradyj_winxp_fbird061.png
http://www.skyzyx.com/temp/bradyj_winxp_ie6sp1.png
http://www.skyzyx.com/temp/bradyj_winxp_op711.png

bradyj
09-19-2003, 04:59 PM
Yeah, I see that this will be rather more complex than I'd like -- thank you for the screen shots. I'll have to figure out the background here as I go I think. Two div's maybe. I'll float one right and leave the other be.

bradyj
09-19-2003, 06:18 PM
I got it to work using tables:
http://www.dotfive.com/angie/index3.html

Now I need to get it to work with <div>'s... any ideas?