473,378 Members | 1,536 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.

Float sandwich?

I'm working on a site with a three-column-float, liquid-center layout
that I believe came from ALA. So, from the top down, the columns are
floats.

In the center column, I'm working on getting tableless forms working.
This again involves floats, from the bottom up through the fieldsets.
For server-side programmatic reasons, the form is itself in a
containing div.

But the form itself isn't floated, and this is causing me problems.
The fieldset expands beyond the form and its containing div, and ends
up overlapping the right column.

You can see a minimal example at:

http://www.jay.fm/files/overlapping.html

I've tried floating the form and its div, but then the "bottom center"
text ends up to the right of the form, for reasons I don't
understand. I've also tried all sorts of position: relative,
clear:both, and width: 100% band-aids to no good effect.

What's the right thing to do here?

Aug 22 '07 #1
4 1867
Jay Levitt wrote:
I'm working on a site with a three-column-float, liquid-center layout
....
>
But the form itself isn't floated, and this is causing me problems.
The fieldset expands beyond the form and its containing div, and ends
up overlapping the right column.

You can see a minimal example at:

http://www.jay.fm/files/overlapping.html
So cool: you've actually provided a URL and made a simplified example
which (mostly) validates. I'm really motivated to help you. Now, if only
I knew something about CSS...
>
I've tried floating the form and its div, but then the "bottom center"
text ends up to the right of the form, for reasons I don't
understand. I've also tried all sorts of position: relative,
clear:both, and width: 100% band-aids to no good effect.

What's the right thing to do here?
The *right* thing? Man, are you picky. I can promise only a hack. My
solution/workaround/total hack first, arm-waving rationale after.

Add a width, e.g. width:10em, to either the fieldset or form rules.

I know you have a width:100% for fieldset already, but that's what's
making it extend too far. I don't know what the fieldset thinks its
width is 100% *of*. By providing a specific width, the problem seems to
go away. In any case, it seems not to have to do with divs or floats.

I actually reduced the problem even more. The code below also shows the
same results:
<form><span>form stuff</span>
<fieldset>in the fieldset</fieldset>
</form>

(<spanis just in there to make <formmore visible behind <fieldset>.)

fieldset { background-color:green; width: 100%; }
form { background-color:yellow; }

Maybe somebody else here who knows about form stying can explain the
problem from this.

--
John
Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html
Aug 22 '07 #2
In article <46**********@news.bluewin.ch>,
John Hosking <Jo**@DELETE.Hosking.name.INVALIDwrote:
So cool: you've actually provided a URL and made a simplified example
which (mostly) validates. I'm really motivated to help you.
O Gee, is that all it takes? Just stand by then John...

--
dorayme
Aug 22 '07 #3
On Wed, 22 Aug 2007 09:24:20 +0200, John Hosking wrote:
Jay Levitt wrote:
>http://www.jay.fm/files/overlapping.html

The *right* thing? Man, are you picky. I can promise only a hack. My
solution/workaround/total hack first, arm-waving rationale after.

Add a width, e.g. width:10em, to either the fieldset or form rules.

I know you have a width:100% for fieldset already, but that's what's
making it extend too far. I don't know what the fieldset thinks its
width is 100% *of*. By providing a specific width, the problem seems to
go away. In any case, it seems not to have to do with divs or floats.
Trouble is, then I can't have the form/fieldsets be liquid, which is the
goal. (And I checked, adding width: 100% all the way up doesn't help.)
>
I actually reduced the problem even more. The code below also shows the
same results:
<form><span>form stuff</span>
<fieldset>in the fieldset</fieldset>
</form>

(<spanis just in there to make <formmore visible behind <fieldset>.)

fieldset { background-color:green; width: 100%; }
form { background-color:yellow; }
Ohhh, very interesting. So maybe 100% width in a fieldset means something
other than the obvious...

Jay
>
Maybe somebody else here who knows about form stying can explain the
problem from this.
Aug 22 '07 #4
Jay Levitt wrote:
>
I'm working on getting tableless forms working.
You can see a minimal example at:

http://www.jay.fm/files/overlapping.html
It's difficult to see what you are really trying to accomplish without
any context. Why don't you put some actual form info in there so we can
better see the real issues?

--
Berg
Aug 22 '07 #5

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

Similar topics

5
by: Pat | last post by:
Give two double-typed variable X and Y. If (X==Y) is true, then how about the following results: (float(X) > float(Y))? (float(X) < float(Y))? (float(X) >= float(Y))? ( X > float(Y) )? ( X...
16
by: Gerald Lafreniere | last post by:
{ float F=123.456000; F*=1000; // Actually I used a for loop F*=10 three times. printf("%f\n", F); } This will produce something like 123456.00XXXX, where XXXX are garbage digits. Why...
6
by: Dave win | last post by:
Hi all: I'm confused with the expression "(float *())". Book says that this is a cast. But, I have no idea of this expr. why could this expr ignore the variable??? Thanx!!!
9
by: Sisyphus | last post by:
Hi, I have some software that does the following (in an attempt to determine whether the double x, can be represented just as accurately by a float): void test_it(double x) { float y = x;...
11
by: Marc Pelletier | last post by:
Hello, I am having trouble implementing the following callback: CNCSError CECWCompressor::WriteReadLine(UINT32 nNextLine, void **ppInputArray) where ppInputArray is a 3 by x array. The...
20
by: ehabaziz2001 | last post by:
That program does not yield and respond correctly espcially for the pointers (*f),(*i) in print_divide_meter_into(&meter,&yds,&ft,&ins); /*--------------pnt02own.c------------ ---1 inch = 2.51...
8
by: vjnr83 | last post by:
Hi, I have a doubt: what is the difference between float **p and float *p? Thanks in advance, Vijay
13
by: Shirsoft | last post by:
I have a 32 bit intel and 64 bit AMD machine. There is a rounding error in the 8th digit. Unfortunately because of the algorithm we use, the errors percolate into higher digits. C++ code is...
3
by: Arnie | last post by:
Folks, We ran into a pretty significant performance penalty when casting floats. We've identified a code workaround that we wanted to pass along but also was wondering if others had experience...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
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...

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.