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

Fluid forms with CSS

I have a simple form.

I am trying to be good and allow for both font sizing, and fluid
layout.

What I want is for the input boxes to align horizontally next to the
labels, but to jump down to the line below when the browser gets too
thin.

I have put up an quick example here:
http://www.thebunnyshed.co.uk/test.htm

I think I have sorted the labels, as these size properly when the font
size is changed.

However, I cannot work out how to:
A) Get the input boxes to use the "rest" of the horizontal space. If I
put "width:100%" then they are always on the line below (First form on
test page).

The second form is sort of what I want, but with the input boxes 100%
of available space.

B) Work out how to enforce a minimum width in IE so that they jump down
when they get too small.

I've been banging my head against a brick wall for hours now. Can any
CSS gurus point me in the right direction?
Many thanks,
Jeremy

Jan 19 '07 #1
2 3477
On 2007-01-19, jg******@parascan.com <jg******@parascan.comwrote:
I have a simple form.

I am trying to be good and allow for both font sizing, and fluid
layout.

What I want is for the input boxes to align horizontally next to the
labels, but to jump down to the line below when the browser gets too
thin.

I have put up an quick example here:
http://www.thebunnyshed.co.uk/test.htm

I think I have sorted the labels, as these size properly when the font
size is changed.

However, I cannot work out how to:
A) Get the input boxes to use the "rest" of the horizontal space. If I
put "width:100%" then they are always on the line below (First form on
test page).
"100% - 5em" is hard to do without tables. It's possible to set things
up like that with absolute positioning (you can make a box 5em from the
left and 0 from the right of its container, which means its width is
100% - 5em). But you won't get the jumping down when it's too narrow
which you want.

[snip]
I've been banging my head against a brick wall for hours now. Can any
CSS gurus point me in the right direction?
I don't think exactly what you want is possible without scripting.

You need to either make the labels a percentage as well instead of 5em,
or sacrifice the jumping-down effect and use a table or absolute
positioning. A table is the easiest.
Jan 19 '07 #2
Ben C wrote:
You need to either make the labels a percentage as well instead of 5em,
or sacrifice the jumping-down effect and use a table or absolute
positioning. A table is the easiest.
Many thanks for your reply. Looks like I will probably have to
sacrifice the jumping down then. I guess I'm just trying to do too
much.

Thanks again.

Jan 20 '07 #3

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

Similar topics

2
by: Alberto Santini | last post by:
I ported a Jos Stam's demo about Fluid mech to check the difference of speed between C implementation and Python. I think I achieved good results with Python and there is space to improve, without...
5
by: Alex Bell | last post by:
I have a fluid header/two column layout at http://www.members.iinet.net.au/~abell1/test/demo10.htm which works with windows MSIE 5.5 and 6, Mozilla, Netscape, and Opera; and Safari but which...
1
by: Clint | last post by:
Hello, I have created a fluid css design for my organization web site, but I am having a small problem with how a table reacts to resizing in IE. I have uploaded an example here:...
22
by: Jam Pa | last post by:
Once again my big mouth has landed me with a tough job. I have a static CSS layout, where each and every element has been defined by pixel size - lots of them, too! Mostly relative elements,...
12
by: JB | last post by:
Hi All, Is it acceptable to use a fixed width vertical navigation column within a fluid 2 or 3 column layout? Example. Left Column (navigation) fixed width of say 180px Right Column (main...
9
by: TristaSD | last post by:
Hi, How do I accomplish the following: In a two-column layout, the right column is 200px wide, and the left column is fluid? Thanks!
2
by: lister | last post by:
I want to center a fluid DIV horizontally. I've tried making the margins auto, but this doesn't work. Can anyone help? CSS drives me nuts! demo here:...
1
by: lister | last post by:
Hi, I have a div with fluid content, below which I want a scrollable div. I can't work out how to style the scrollable div to say "use the rest of the space in the container". The best I can...
3
by: hzgt9b | last post by:
I want a page with a centered div containing two rows. Top row has an image and some text. The bottom row needs to have three columns. I'd love to have the 1st column set to a fixed width then have...
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: 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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.