5 replies [Last post]
tmrhymer
Offline
newbie
Last seen: 11 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-10-24
Posts: 8
Points: 4

Kind of a strange way of decribing what I am trying to achieve but I am not having much luck searching google or these forums for a solution.

Basically, I want to have 3 or more floating divs function the same as a an html table's cells would. If I have a table with 1 row and 4 cells and don't specify the cell widths and leave 2 of the cells empty, the other two that have content will evenly fill the space that the empty ones would have occupied. Ok. So how I can achieve this using div's, or should I be using a table for something like this. Trying to get this same functionality with div's is becoming quite the chore.

Does that make sense, or do you need more information?

purewebdesigner
purewebdesigner's picture
Offline
Enthusiast
Washington DC
Last seen: 3 years 8 weeks ago
Washington DC
Timezone: GMT-5
Joined: 2007-04-22
Posts: 234
Points: 95

It makes since, but I never

It makes since, but I never understood why tables worked like that in the first place. Why not just create it for the content that will fill the area. If you can make sure it is flexible, this is great for when visitors don't have text size set to default.

I'm sure you could do something like this using some jquery, but that's beyond me.

CSSExpression EngineHTMLWordpressCoffee

Personal Website: curtisscott.com
Follow Me on Twitter: twitter.com/curtisscott_com

tmrhymer
Offline
newbie
Last seen: 11 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-10-24
Posts: 8
Points: 4

The use case for something

The use case for something like this is in a CMS. Specicifically dotnetnuke. To simplify the skinning process designers will utilize this flaw/feature of tables to create designs where if the left and/or right columns are empty the main column will grow to fill the space. It just makes it to where you dont have to have a skin for 1 column, a skin for 2 columns, and a skin for 3 columns.

Also, I wanted to utilize it in a section of my page where users can place multiple "feature" boxes. For, flexibility and scalability, I want to give the users entering content the freedom to add however many features they want, up to a certain number (4 or 5). However, if they choose to use that space and only want 2, 3 features, or maybe even 1, I want the spacing to be even.

In Dotnetnuke, when an area that is available to place content (called a pane) is empty, the dotnetnuke engine automatically adds a cssclass to that element so skin designers can manipulate it to create this flexible layout.

Make sense?

purewebdesigner
purewebdesigner's picture
Offline
Enthusiast
Washington DC
Last seen: 3 years 8 weeks ago
Washington DC
Timezone: GMT-5
Joined: 2007-04-22
Posts: 234
Points: 95

Thanks for clearing that up.

Thanks for clearing that up. I'd say just make it right with 1, 2, 3, 4, and 5col layouts just encase. Your code will be clean, better indexed, and easier to maintain than tables. Just my 2 cents

CSSExpression EngineHTMLWordpressCoffee

Personal Website: curtisscott.com
Follow Me on Twitter: twitter.com/curtisscott_com

tmrhymer
Offline
newbie
Last seen: 11 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-10-24
Posts: 8
Points: 4

You mean you think i should

You mean you think i should create 5 different skins/templates? I think I'd rather use tables...lol.

So there's not a clean way to do what i am talking about?

purewebdesigner
purewebdesigner's picture
Offline
Enthusiast
Washington DC
Last seen: 3 years 8 weeks ago
Washington DC
Timezone: GMT-5
Joined: 2007-04-22
Posts: 234
Points: 95

I don't know of any.

I don't know of any.

CSSExpression EngineHTMLWordpressCoffee

Personal Website: curtisscott.com
Follow Me on Twitter: twitter.com/curtisscott_com