473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

3 row table layout but no fixed columns

I'm trying to create a 3 row layout in which each row will have two blocks,
BUT I want the width of these blocks to be independent of the blocks in the
other rows. So AFAICT a regular table layout is completely unsuitable.

I've been trying to recreate this idea with CSS for a couple hours now, using
positioned divs, but am not even close. (Maybe FF 1.5 is the problem?) Even
if I did manage to position the top and bottom rows within the overall div
(which I've gotten close to - except then the "cell" divs do not position
within their row), I'm not sure how to guarantee that there was no overlap
with the middle one.

This seems like such a simple layout! Can anyone point me in the right
direction? If I can't get it soon, I'm going to try a 3-row 1-column table
with positioned spans in each row, but that seems so hackish.

Thanks,
Tim
Feb 1 '08 #1
5 5489
In article <80******************@newsfe19.lga>,
Timothy Larson <th*********@cox.netwrote:
I'm trying to create a 3 row layout in which each row will have two blocks,
BUT I want the width of these blocks to be independent of the blocks in the
other rows. So AFAICT a regular table layout is completely unsuitable.
Not at all. You *could* have 3 tables, one after another.
I've been trying to recreate this idea with CSS for a couple hours now, using
positioned divs, but am not even close. (Maybe FF 1.5 is the problem?) Even
if I did manage to position the top and bottom rows within the overall div
(which I've gotten close to - except then the "cell" divs do not position
within their row), I'm not sure how to guarantee that there was no overlap
with the middle one.

This seems like such a simple layout!
BUT I want the width of these blocks to be independent of the blocks in the
other rows.

OK.

HTML:

block block

<div style="clear:both;"></div>

block block

<div style="clear:both;"></div>

block block

<div style="clear:both;"></div>

CSS:

block {float:left;}

Now you can use p or div or other things for my "block" to suit
your semantic needs. You do have such needs don't you? And you
can add margins and padding to all this as you like. All of it
can be shrink to fit the contents if you don't specify widths.

If you want further help, just say what specs you want.

--
dorayme
Feb 2 '08 #2
dorayme wrote:
In article <80******************@newsfe19.lga>,
Timothy Larson <th*********@cox.netwrote:
>I'm trying to create a 3 row layout in which each row will have two blocks,
BUT I want the width of these blocks to be independent of the blocks in the
other rows. So AFAICT a regular table layout is completely unsuitable.

Not at all. You *could* have 3 tables, one after another.
>I've been trying to recreate this idea with CSS for a couple hours now, using
positioned divs, but am not even close. (Maybe FF 1.5 is the problem?) Even
if I did manage to position the top and bottom rows within the overall div
(which I've gotten close to - except then the "cell" divs do not position
within their row), I'm not sure how to guarantee that there was no overlap
with the middle one.

This seems like such a simple layout!
>BUT I want the width of these blocks to be independent of the blocks in the
other rows.


OK.

HTML:

block block

<div style="clear:both;"></div>

block block

<div style="clear:both;"></div>

block block

<div style="clear:both;"></div>

CSS:

block {float:left;}

Now you can use p or div or other things for my "block" to suit
your semantic needs. You do have such needs don't you? And you
can add margins and padding to all this as you like. All of it
can be shrink to fit the contents if you don't specify widths.

If you want further help, just say what specs you want.
This group used to have a FAQ, and at one time even had a website.

Perhaps a resource somewhere for most of the common layouts so people
don't have to make all the wrong moves first. I mention that to you
because you have some interest in this. If nothing else, a regularly
posted metafaq would be helpful.

Jeff
>
Feb 2 '08 #3
Jeff wrote:
>
This group used to have a FAQ, and at one time even had a website.
The old site is archived, but wasn't kept up so became too outdated to
be very useful. Too bad.
Perhaps a resource somewhere for most of the common layouts so people
don't have to make all the wrong moves first.
Try the CSS-discuss mailing list site and archives
http://css-discuss.incutio.com/?page=CssLayouts

--
Berg
Feb 2 '08 #4
In article <13*************@corp.supernews.com>,
Jeff <jeff@spam_me_not.comwrote:
This group used to have a FAQ, and at one time even had a website.
Probably not a good idea as it would then have a central place
for everyone to constantly argue and misunderstand each other
about. Much better for everyone to be at cross purposes all the
time over issues that come and go. You see, my friend, their
going is the signal for the sky to smile in optimistic hope. Call
me cynical. Call me embittered. But I am not as silly as the sky.

--
dorayme
Feb 2 '08 #5
Bergamot wrote:
Jeff wrote:
>This group used to have a FAQ, and at one time even had a website.

The old site is archived, but wasn't kept up so became too outdated to
be very useful. Too bad.
>Perhaps a resource somewhere for most of the common layouts so people
don't have to make all the wrong moves first.

Try the CSS-discuss mailing list site and archives
http://css-discuss.incutio.com/?page=CssLayouts
I love it, and I never would have found it myself.

Now, I hate that there is no sitemap and that I don't have enough time
to read all of it.

Thanks,
Jeff
Feb 2 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

157
by: Dennis | last post by:
Is there some way --using, say, DOM or javascript-- to detect the current pixel width and/or height of a relatively sized table or of one of its columns or rows. I'm going to be writing javascript...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
28
by: Anthony Williams | last post by:
Good morning, I'm currently designing a site, using CSS, and wish to create a variable width two-column layout, with header and footer, and one fixed-width column on the left. Previously, I...
25
by: Michael Schuerig | last post by:
I'm trying to do something seemingly very simple, but it's brought me close to crushing my head on the keyboard. All I want is a table where the head row is fixed and the body columns below are...
4
by: Rob Freundlich | last post by:
I have some servlet-generated tabular data that I need to present, so I'm using an HTML Table. In some cases, it can be quite large. I'm flushing the servlet output every N lines to push the data...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
16
by: Jef Driesen | last post by:
I have created a nice idea for a website and now I would like to translate that idea in (x)html and css. The layout is quite basic: a header, two columns and a footer. For a graphical presentation,...
13
by: annecarterfredi | last post by:
I'd like to add a new column to an existing table at a specific column location... Existing table definition: MyTable(Col1, Col2, Col3) I want to add a new column in MyTable and the new...
4
by: Tor Inge Rislaa | last post by:
Table or Div Is there a common rule or "best practice" concerning when to use TABLE and when to use DIV tag's when designing a master page? I am designing a master page with a header and...
2
by: bgold12 | last post by:
I have a problem that can be simplified to the following: I have a table with three columns. I need the middle column to be fixed width, let's say 100px. The other two columns I want to be variable...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.