473,378 Members | 1,462 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,378 software developers and data experts.

containers side by side

Hello:

I've put a post up previously asking how to position containers. I
wanted to ask this question theoretically to see what folks think is
the optimal way.

If I have a container, and I then have 2 sub-containers inside of this
larger container, what is the best way to I naturally position them
side-by side - without position: absolute, so that they can grow down
when the content inside the containers grows. So the question is in
general, what's the best way to position columns side by side that
doesn't require absolute.

Thanks very much in advance!

Mike

Apr 16 '07 #1
6 4053
On 2007-04-16, Miked <mi*************@gmail.comwrote:
Hello:

I've put a post up previously asking how to position containers. I
wanted to ask this question theoretically to see what folks think is
the optimal way.

If I have a container, and I then have 2 sub-containers inside of this
larger container, what is the best way to I naturally position them
side-by side - without position: absolute, so that they can grow down
when the content inside the containers grows. So the question is in
general, what's the best way to position columns side by side that
doesn't require absolute.
Make each column float: left, or use a table. Which is best? Depends on
the details of what you need.
Apr 16 '07 #2
Miked wrote:
Hello:

I've put a post up previously asking how to position containers. I
wanted to ask this question theoretically to see what folks think is
the optimal way.

If I have a container, and I then have 2 sub-containers inside of this
larger container, what is the best way to I naturally position them
side-by side - without position: absolute, so that they can grow down
when the content inside the containers grows. So the question is in
general, what's the best way to position columns side by side that
doesn't require absolute.

Thanks very much in advance!

Mike

If your containers have unequal lengths (most likely) use a table. You
can use some tricks to make floats work but if you're trying to float an
entire column you'll have problems getting the background colors to
extend to the end of the column unless you use a background image.

On the other hand if you're working with images and text, use float.
Images have defined widths and heights so they're easy to float but
calculating the height of a block of text is impossible.

I'd use a table.

Apr 16 '07 #3
zzpat wrote:
>
You
can use some tricks to make floats work but if you're trying to float an
entire column you'll have problems getting the background colors to
extend to the end of the column unless you use a background image.
It's easier than you think. Use borders, floats and negative margins.
http://www.bergamotus.ws/samples/2co...h-borders.html

--
Berg
Apr 16 '07 #4
In article <58*************@mid.individual.net>,
Bergamot <be******@visi.comwrote:
zzpat wrote:

You
can use some tricks to make floats work but if you're trying to float an
entire column you'll have problems getting the background colors to
extend to the end of the column unless you use a background image.

It's easier than you think. Use borders, floats and negative margins.
http://www.bergamotus.ws/samples/2co...h-borders.html
This is clever and as far as I see, good.

A lot of trouble can go into the requirement to have cols look
the same height. It is liberating and makes things much simpler
not to require such. This is not a criticism of the example above.

--
dorayme
Apr 16 '07 #5
Bergamot wrote:
zzpat wrote:
>You
can use some tricks to make floats work but if you're trying to float an
entire column you'll have problems getting the background colors to
extend to the end of the column unless you use a background image.

It's easier than you think. Use borders, floats and negative margins.
http://www.bergamotus.ws/samples/2co...h-borders.html

It's an interesting approach but it has limits. Adding a border to
..content when .navbar is longer causes a collapse of sorts...

..contents "bottom border" isn't 100%, but the trick (hack) seems to work
except for the above limitation. I'd have to test it further to find
other flaws.
Apr 17 '07 #6
zzpat wrote:
Bergamot wrote:
>zzpat wrote:

http://www.bergamotus.ws/samples/2co...h-borders.html

It's an interesting approach but it has limits. Adding a border to
.content when .navbar is longer causes a collapse of sorts...
Then you add another container and put the border on that. See the
Ruthsarian layouts I linked to. They have a more complex layout with
added borders on just about everything.

I used to point people there all the time, but they seemed overwhelmed
by it so I made a simpler version just to show the basic technique. It
works, and it works well.

--
Berg
Apr 17 '07 #7

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

Similar topics

1
by: Anton | last post by:
Hello ! I am writing a small program and wondering whether this expression is right? std::list< std::string > strList I mean that this is container into container and don't know the side...
3
by: Catherine Lynn Smith | last post by:
I want to know the recommended way to handle scripting of/with containers such as an iframe. I have a page with border-navigation bars on the top/bottom/left/right and I want to use an iframe to...
14
by: phil_gg04 | last post by:
Dear C++ Experts, Over the last couple of months I have been writing my first program using shared memory. It has been something of an "in-at-the-deep-end" experience, to say the least. At...
18
by: Matthias Kaeppler | last post by:
Hi, in my program, I have to sort containers of objects which can be 2000 items big in some cases. Since STL containers are based around copying and since I need to sort these containers quite...
1
by: Jean-Marc Blaise | last post by:
IBM recommends to place each ts container on a different physical disk. What about the impacts if all containers (DMS) are in the same FS (supported by multiple disks) ? Does DB2 preallocate...
2
by: Dynamo | last post by:
Hi there, I have a curious problem I can't seem to solve. I have a list box that gets filled with data, the user selects an item in this list, then a form view displays the full details from...
35
by: dragoncoder | last post by:
Just a simple theoritical question to the experts. What was the rationale behind making STL containers follow copy semantics rather than reference semantics. References almost always make things...
15
by: Nindi73 | last post by:
HI If I define the class DoubleMap such that struct DoubleMap : public std::map<std::string, double>{}; Is there any overhead in calling std::map member functions ? Moreover are STL...
21
by: George Exarchakos | last post by:
Hi everyone, I'd like your help... Can we have a std::list<BASEwhere BASE be the base class of a class hierarchy? I want to add to this list objects that are inherited from BASE class but not...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.