Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Can't get columns right!
Old 07-14-2006, 08:46 AM Can't get columns right!
Average Talker

Posts: 19
Location: UK
Trades: 0
Hello there,

First off, a link to an example:
http://www.stroud.gov.uk/docs/columnsproblem.htm

What I want is that columns 4 5 & 6 appear below columns 1 2 & 3.

I've been playing about with <div>s adding new ones, changing position (absolute/relative etc) but I can't get it to work.

The real page is generated by ASP from a database so the number of items will not always be the same.

Anyone have any ideas?
Cheers
Mike
MikeyB987 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-14-2006, 09:30 AM Re: Can't get columns right!
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Save the Children
Posts: 176
Location: MS
Trades: 0
You need a top property in your second set of column's that's why they are overwriting each other.

But absolute position is the wrong way to go about making stackable columns unless the overflow is set to scroll because you will never know where one column ends or another begins.

The only way I can think of requires a table like setup.

for example:

HTML Code:
<div class="row">
 <div class="col"></div>
 <div class="col"></div>
 <div class="col"></div>
</div>
<div class="row">
 <div class="col"></div>
 <div class="col"></div>
 <div class="col"></div>
</div>
Code:
.row {
 clear: both;
}
.col  {
 display: inline;
 width: 30%;
}
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 07-14-2006, 12:33 PM Re: Can't get columns right!
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
If it's tabular data, then use tables, as that's what they're meant for.

I did something similar to what you want but it wasn't tabular and I didn't use tables. I used floats and 2 wrappers. 1 wrapper for the top columns, a 2nd wrapper for the bottom columns, floated the columns inside the wrappers. As long as you make sure you CLEAR the floats, then the bottom ones will stay underneath.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-14-2006, 04:39 PM Re: Can't get columns right!
Average Talker

Posts: 19
Location: UK
Trades: 0
Thanks for your replies.

AliKat, I'll have a try with your idea, but it'll have to wait till I get back to work on Monday!


LadynRed, I did try tables to start with, but the problem is I need the data going down the columns rather than across.:
A D G
B E H
C F I
Which is all very well if it's static data, but it's coming from a database in alphabetical order and it needs to be layed out as the little example above.

I might try something like splitting the data into 3 arrays, hmmmmmm....
Have to have a play on Monday morning.

Cheers for now
Mike
MikeyB987 is offline
Reply With Quote
View Public Profile
 
Old 07-18-2006, 05:32 AM Re: Can't get columns right!
Average Talker

Posts: 19
Location: UK
Trades: 0
Morning!

Just had a look, didn't have time yesterday, and thanks to your idea AliKat I have got it working.

I imagine its the clear:both; on the row div that does the trick, I'd have never come up with that, I'm still poor at CSS!

Looks like I'll be able to produce the report as the bosses want it now!!!


Many thanks
Mike
MikeyB987 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Can't get columns right!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.63139 seconds with 12 queries