CSS newsgroup similar to this one?

R

Randy Morgan

Is there a newsgroup similar to this one that focuses on CSS layout
issues? I'm assuming that would be a little too off-topic for this group.

Life is going just a little too good right now, so I decided to do some
penance and redesign my site using CSS instead of tables for page layout.
 
M

Murray

Heh - that will get your blood flowing. Why not try posting your questions
here first? Most of the CSS sites I know of are pretty advanced, but you
can probably find all of them with a Google for "CSS Forum".
 
R

Randy Morgan

My questions are myriad, but Google has provided many answers.

The thing I'm currently struggling with is what I'll call a complete
vertical fill of a border or a background color, which I see when
testing in both IE and Firefox.

Lets say I have a three-column layout. Each column is inside its own
div and things are floated such that it lines up properly. All three of
those divs are inside a container div. If I apply a background color or
background image to one of the divs, or if I try to apply a border to
the left or right side of one of the divs, they don't "fill" all the way
to the bottom of the element the way they do in a table. FF and IE have
different ideas on where to stop filling or tiling, but they both seem
to want to stop before the bottom of the element.

A complicating issue is that on some pages the middle div will be
tallest and on others the right div will be tallest, which is why I put
all three (left, center, and right) in one container. And, the "height"
of a div may be different from page to page, so using a background image
of a certain height won't work, either.

One other problem I found is that 'absbottom' is not valid any longer,
or at least it causes the page to fail validation. The workaround to
make an included page with no content other than an image is thus a
little awkward, but I seem to have made it work.

In general, and in my exceedingly uninformed and humble opinion, I have
a lot better luck using CSS to control things horizontally that vertically.


Randy Morgan
 
M

Murray

Randy:

Your question (and problem) is a common one when trying to create multiple
CSS columns.

There are two things you can do to make your life simpler:

1. Understand how to clear floats - when an item is floated within a
container, the container no longer needs to wrap the item, and so it will
collapse to the height of its smalllest non-floated content. This means
that the floated item *can* poke through the bottom of the container. If
your background color is in the container, then you will not see that
background color extend the full height of the floated element, as a result.
You can solve this by clearing the float before closing the container. In
other words, in this arrangement -

<div id="container" style="background-color:red;"><div id="content"
style="float left;">whatever</div></div>

as you add more content to the content div, you will not see the red
background expand to wrap it. However, consider this -

<div id="container" style="background-color:red;"><div id="content"
style="float left;">whatever</div>
<br style="clear:left;">
</div>

The float is cleared before the container is closed. Now it must catch up
to its content. That can solve many problems such as you mention. This
method is useful when the container backgrounds need to stretch.

2. The other useful technique is one I will call a 'faux column" - a
colored background image that looks like it is a column filling space
vertically, and over which your content container is showing, but now you
have no need to try to stretch the content container vertically to fill its
wrapper. This is useful when the content containers do not stretch.

Get what I am saying?
 
R

Randy Morgan

Murray,

Yes, I think I'm beginning to see. I tried clearing the float and it
worked if I had the background image inside the div rather than the
container. Now I need to go back and figure out what exactly I did!

Thanks,
Randy
 
M

Murray

You're welcome!

--
Murray
============

Randy Morgan said:
Murray,

Yes, I think I'm beginning to see. I tried clearing the float and it
worked if I had the background image inside the div rather than the
container. Now I need to go back and figure out what exactly I did!

Thanks,
Randy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top