Jump to content

two column div help


centenial

Recommended Posts

Hi,

I need a DIV that will appear to be in two columns. Example: [url=http://www.dynamicdrive.com/style/csslibrary/item/css-tableless-form/]http://www.dynamicdrive.com/style/csslibrary/item/css-tableless-form/[/url]

However, I want it to start going up to the second column ONLY after a certain # of lines (Or height space) has been reached. Is this possible with CSS?

I appreciate your help,
Link to comment
Share on other sites

Something like this:
[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DIV Columns</title>
<style type="text/css">

#col1, #col2 {
    width: 100px;
    padding: 10px;
    border: 1px solid #F00;
    float: left;
}

#col2 {
    border: 1px solid #00F;
}
</style>
</head>
<body>

<div id="col1">Item1<br />
Item2<br />
Item3<br />
Item4<br />
Item5</div>
<div id="col2">Item6<br />
Item7<br />
Item8<br />
Item9<br />
Item10</div>

</body>
</html>[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.