473,654 Members | 3,071 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

equal height floated columns

I've come to the conclusion that float was never made for designing a
page, but is there a good way to float three columns with the following
characteristics ?

leftColumn 20%
rightColumn 20%
centerColumn use what's left

I'm currently defining centerColumn as a %, but to get this to work
properly the margin, padding and border settings have to be exactly the
same in both left and rightColumns. Talk about a pain.

Height in all three columns should equal 100% and I'm no where near
finding a solution.

The optimum solution wouldn't include absolute positioning, tables,
images or 1000 hacks.

Mar 16 '07 #1
18 3326
zzpat <zz*******@gmai l.comwrote:
>I've come to the conclusion that float was never made for designing a
page
Correct, assuming that by "designing a page" you mean create a layout.
Not that "not made for" should matter if a CSS method does a good job
for whatever other purpose you want to put it to. But that's not the
case here, floating causes a raft of problems when it is abused to
create a "CSS layout".
>, but is there a good way to float three columns with the following
characteristic s?
I presume you intended the write something like "create" instead of
"float". CSS 2.x has quite limited options to create a layout and it
doesn't offer anything specifically designed for that purpose.
>leftColumn 20%
rightColumn 20%
centerColumn use what's left

I'm currently defining centerColumn as a %, but to get this to work
properly the margin, padding and border settings have to be exactly the
same in both left and rightColumns.
There are no such limitations.
>Height in all three columns should equal 100%
100% of what?
>and I'm no where near
finding a solution.
Did you check the many CSS layout templates that are out there?
>The optimum solution wouldn't include absolute positioning
That limits your options to about nil as ABS positioning is the only CSS
method that can be considered as suitable for creating a layout that is
also supported by IE. Why are you poised against ABS positioning?

--
Spartanicus
Mar 16 '07 #2
On 16 Mar, 17:14, zzpat <zzpatr...@gmai l.comwrote:
I've come to the conclusion that float was never made for designing a
page, but is there a good way to float three columns with the following
characteristics ?
Use a <table>

(Equal heights imply a coupling between columns that's only
expressible in HTML by use of the <tableelement .)

Mar 16 '07 #3
Andy Dingley wrote:
On 16 Mar, 17:14, zzpat <zzpatr...@gmai l.comwrote:
>I've come to the conclusion that float was never made for designing a
page, but is there a good way to float three columns with the following
characteristic s?

Use a <table>

(Equal heights imply a coupling between columns that's only
expressible in HTML by use of the <tableelement .)
What's your opinion on floating an entire column within a table?

I've never actually floated a column in a table so I'm not aware of the
problems that might occur. Are there many?

I'm most likely looking at floating three columns; left, center and
right as mentioned previously but would you do away with float or keep it?
Mar 16 '07 #4
On 2007-03-16, zzpat <zz*******@gmai l.comwrote:
Andy Dingley wrote:
>On 16 Mar, 17:14, zzpat <zzpatr...@gmai l.comwrote:
>>I've come to the conclusion that float was never made for designing a
page, but is there a good way to float three columns with the following
characteristi cs?

Use a <table>

(Equal heights imply a coupling between columns that's only
expressible in HTML by use of the <tableelement .)

What's your opinion on floating an entire column within a table?
So long as it's within a table cell there's no problem. Don't just put a
floated element in a <table>, and don't float a <td>.
I've never actually floated a column in a table so I'm not aware of the
problems that might occur. Are there many?
Should be fine.
I'm most likely looking at floating three columns; left, center and
right as mentioned previously but would you do away with float or keep it?
It won't really help with making all the columns the same height. Make
each column a <td>.
Mar 16 '07 #5
Andy Dingley wrote:
>
(Equal heights imply a coupling between columns that's only
expressible in HTML by use of the <tableelement .)
Not necessarily. Equal height columns are possible using borders, floats
and negative margins.
http://webhost.bridgew.edu/etribou/l...dux/index.html

The side column widths have to be set in units suitable for borders, so
percents are out, but ems and px both work nicely.

--
Berg
Mar 16 '07 #6
Spartanicus wrote:
>
>leftColumn 20%
rightColumn 20%
centerColumn use what's left

I'm currently defining centerColumn as a %, but to get this to work
properly the margin, padding and border settings have to be exactly the
same in both left and rightColumns.

There are no such limitations.
I start with the two side columns equaling 40% but the center isn't even
close to 60%. I realized margins would throw the center column into a
tizzy but borders AND padding?

I can see border but even that sucks, but padding sucks even more
because I wanted more padding in the right column. Keeping track of
borders, margins and paddings for three columns is too much work and one
small change causes the center column to drop below the side columns.

I'm about ready to give up on floating everything because of the
limitations on the height of columns. I wanted the background color to
extend 100% and was hoping for something easy.
One last question; Let say I have the following...

..centerColumn {
}

..centerColumn h3 {
}

..centerColumn p {
}

..centerColumn blockquote {
}

..centerColumn blockquote h3 {
}

and

..centerColumn blockquote p {
}

....is there an easier way to write this? I'm looking at a three column
layout and I want as few classes in the markup as possible.
Mar 16 '07 #7
zzpat <zz*******@gmai l.comwrote:
>There are no such limitations.

I start with the two side columns equaling 40% but the center isn't even
close to 60%. I realized margins would throw the center column into a
tizzy but borders AND padding?
Since you have ignored the reasonable questions that were put to you,
I'll return the favour and ignore you from now on.

--
Spartanicus
Mar 16 '07 #8
Spartanicus wrote:
zzpat <zz*******@gmai l.comwrote:
>>There are no such limitations.
I start with the two side columns equaling 40% but the center isn't even
close to 60%. I realized margins would throw the center column into a
tizzy but borders AND padding?

Since you have ignored the reasonable questions that were put to you,
I'll return the favour and ignore you from now on.
100% of what? I answered that with 100% background color - but you
already knew that and you're toying with me.

Did I check out templates? Yes. Many of them. I wouldn't be here if I
hadn't.

My request was for a layout that didn't include absolute positioning. I
thought my request was clear. Perhaps I should have typed it slower so
you could better understand.
Mar 16 '07 #9
Bergamot wrote:
Andy Dingley wrote:
>(Equal heights imply a coupling between columns that's only
expressible in HTML by use of the <tableelement .)

Not necessarily. Equal height columns are possible using borders, floats
and negative margins.
http://webhost.bridgew.edu/etribou/l...dux/index.html

The side column widths have to be set in units suitable for borders, so
percents are out, but ems and px both work nicely.

I tried this and it didn't work for me. Can you do write a simple
example when you have the time?

I'm heading out the door in a few minutes and I won't be home until
Saturday afternoon so there's no hurry.
Mar 16 '07 #10

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

Similar topics

3
2003
by: Alison Stewart | last post by:
A perennial problem; apologies if people are sick of this one. I have a dynamic-width page with stripes on the left and the right; the left stripe is defined in "body {background:}", while the right stripe is in a right-floated div. Has anyone come up with a method to make a right-floated image run the full height of the document? Both Mozilla and IE(5, probably 6) take "height: 100%" to mean "100% of the viewport height". Scroll...
0
2361
by: Linda Antonsson | last post by:
Hi, I am trying to put together a CSS-based layout consisting of a header, a sidebar and a main content area. Page: http://www.westeros.org/ASoWS/ CSS: http://www.westeros.org/ASoWS/ASoWS-All.css (the relevant IDs are towards the bottom) JS: http://www.westeros.org/ASoWS/SetHeight.js
3
2890
by: Andy | last post by:
Okay here is what I have been Googleing and Googleing in an effort to find an answer to my current design delemma: Css columns equal height; macromedia.com columns equal... basically variations on this. And apparently, there is No answer. Er, no Good answer. But somehow, some web designer over at Macromedia.com sold his soul and managed to get two columns to line up and (with a gap between exposing a gradient background). Does anyone know...
11
2126
by: Chris Beall | last post by:
Here's the problem: http://pages.prodigy.net/chris_beall/Demo/theproblem.html The page contains inline text, then some additional pairs of text which are floated right and left. (This is a transcript of a historical legal document with signatures on the right and witnesses on the left). The 'document' ends with no additional inline text. The background of the entire document should be brown inside a white body, (in this test the body...
0
7643
by: Seguros Catatumbo | last post by:
Hi, i have this code on a test site: <html> <head> <style type="text/css"> #main{ border:1px solid #000063; border-width:1px; background:#FFF; width:400px; margin: 0 auto;
2
6052
by: Eric Lindsay | last post by:
I hope someone can help, before I start thinking tables have a lot of merit after all. I am trying to achieve a two column layout, with source code div order main content, right side navigation, footer. Naturally I want liquid main contents, and I have float: right; img, and clear: both; paragraphs in the main contents div. Fixed width right navigation column is probably essential. There is a confounded logo graphic to go at the top...
8
2923
by: Harris Kosmidhs | last post by:
I have my whole page in a <tablejust to center it. Now I changed it and used a div instead: #wrapper { width:900px; margin:0 auto 0 auto; border-left:1px solid; border-right:1px solid; background-color:#fff; }
0
3589
by: Nik Coughlin | last post by:
Something that I've been trying to do for a long time is a 3 column layout where all three columns have equal height, and have rounded corners implemented using PNGs with alpha. One of my early attempts is here: http://www.nrkn.com/3ColRoundAlpha/ It shows a bunch of different methods that I tried. You'll see that not only is there a hell of a lot of nesting of divs, but the page is very slow to load because there are a lot of image...
1
2974
by: neridaj | last post by:
Hello, I've found a few postings of this problem but none of the answers seem to fix my problem. I have a content div wrapped around a left floated image and a right floated table. I want the table to dictate the height to the content div instead of popping out of the bottom of the content div. Seems pretty simple but too complicated for me I guess. If you know how to achieve this please share. Thanks, J /*begin code*/
0
8296
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8710
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8598
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.