473,405 Members | 2,294 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,405 software developers and data experts.

Outlining form inputs

Hi there,

I am wondering if the following can be accomplished in CSS:

I have a form with one input per line. Each input is preceded with a
label of variable character length. I would like my input's width to
grow and fill the rest of the available line. I can't see a way of
doing this in pure CSS, the only alternative I see is wrapping each
line in a 2-column table, and setting the input width to 100% of the
containing cell.

Any ideas?

Regards,

Gerry.

May 29 '06 #1
4 1278
Gerry Vandermaesen <ge****************@gmail.com> scripsit:
I have a form with one input per line. Each input is preceded with a
label of variable character length. I would like my input's width to
grow and fill the rest of the available line. I can't see a way of
doing this in pure CSS,
Of course you can do _nothing_ in pure CSS. You need some HTML (or XML) as
well. In this case, you need some markup structure so that you have some
elements to attach CSS rules to. So what is your markup? In theory, it
should be independent of styling, but in practice, styling considerations
can be essential. This means that you could consider using a table, which
would be a logical approach anyway.
the only alternative I see is wrapping each
line in a 2-column table, and setting the input width to 100% of the
containing cell.


Well, it seems that you already have a solution - you just haven't sold it
to yourself yet!

Actually the most difficult part might be setting the width for the _first_
column. You can't just leave it unspecified and the set the entire table's
width to 100%, because browsers will treat this in different ways . Perhaps
the best shot is to set the first column's width in em units, using some
good guess based on the expected maximum length of the labels.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

May 29 '06 #2
On Tue, 30 May 2006 00:53:13 +0300 Jukka K. Korpela <jk******@cs.tut.fi> wrote:
| Gerry Vandermaesen <ge****************@gmail.com> scripsit:
|
|> the only alternative I see is wrapping each
|> line in a 2-column table, and setting the input width to 100% of the
|> containing cell.
|
| Well, it seems that you already have a solution - you just haven't sold it
| to yourself yet!

There are people hanging around that will say that tables should not be
used (except for tabular data). What he really needs to do is learn to
ignore them.
| Actually the most difficult part might be setting the width for the _first_
| column. You can't just leave it unspecified and the set the entire table's
| width to 100%, because browsers will treat this in different ways . Perhaps
| the best shot is to set the first column's width in em units, using some
| good guess based on the expected maximum length of the labels.

If you narrow the browsers down to just those that are in compliance with
web standards, will they still treat the 100% width in different ways?

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / sp**********************@ipal.net |
|------------------------------------/-------------------------------------|
May 30 '06 #3

ph**************@ipal.net wrote:
On Tue, 30 May 2006 00:53:13 +0300 Jukka K. Korpela <jk******@cs.tut.fi> wrote:
| Gerry Vandermaesen <ge****************@gmail.com> scripsit:
|
|> the only alternative I see is wrapping each
|> line in a 2-column table, and setting the input width to 100% of the
|> containing cell.
|
| Well, it seems that you already have a solution - you just haven't sold it
| to yourself yet!

There are people hanging around that will say that tables should not be
used (except for tabular data). What he really needs to do is learn to
ignore them.


Well wrapping each line in an individual table didn't look like a very
clean solution. But perhaps in this case it's the only valid solution
to accomplish my goal?

May 30 '06 #4
On 30 May 2006 05:19:31 -0700 Gerry Vandermaesen <ge****************@gmail.com> wrote:
|
| ph**************@ipal.net wrote:
|> On Tue, 30 May 2006 00:53:13 +0300 Jukka K. Korpela <jk******@cs.tut.fi> wrote:
|> | Gerry Vandermaesen <ge****************@gmail.com> scripsit:
|> |
|> |> the only alternative I see is wrapping each
|> |> line in a 2-column table, and setting the input width to 100% of the
|> |> containing cell.
|> |
|> | Well, it seems that you already have a solution - you just haven't sold it
|> | to yourself yet!
|>
|> There are people hanging around that will say that tables should not be
|> used (except for tabular data). What he really needs to do is learn to
|> ignore them.
|
| Well wrapping each line in an individual table didn't look like a very
| clean solution. But perhaps in this case it's the only valid solution
| to accomplish my goal?

For my N-column layouts, I frequently use a table with ONE row and N cells
where each whole column takes a cell. Text and other stuff then flows in
that cell. For example: http://linuxhomepage.com/

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / sp**********************@ipal.net |
|------------------------------------/-------------------------------------|
Jun 1 '06 #5

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

Similar topics

5
by: Yang Li Ke | last post by:
Hi I know that there is a meta tag function to get all meta tags from a url. I am searching for a similar function that would get all values of a form. something like : <form> <input...
0
by: Uri Dor | last post by:
( /// <summary> /// One type of reportlayout ) /// </summary> ( public abstract class ReportKind { ) } in the above example, the () signs stand for the outlining entities as marked by VS....
0
by: PawelSokolowski | last post by:
Hi all, Is it possible to save outlining in VC++ .NET ? It is annoying that my view that I customized using outlining is gone after closing IDE. Best Regards PawelS
4
by: pizzy | last post by:
INTRO: I tried to clean it up for easy reading. I hope I didn't make any mistakes. PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see "TAGSELECTED") to print my textboxes (see...
5
by: pizzy | last post by:
I am having a problem with the last results. I can't seem to be able to get the input2A and input3A to appear. I don't seem to have a problem with the show and hide after a number is entered and...
3
by: KK | last post by:
Dear All Recently I started using VisualStudio2005 for my C++ development.Earlier I was using 2003. I found difference between these two version in showing the code outlining. For example : ...
4
by: jedimasta | last post by:
Good evening all, I'm a relatively new to javascript, but I've been working with ColdFusion and PHP for years so I'm not necessarily ignorant, just stuck and frustrated. Using ColdFusion I'm...
5
by: sdragolov | last post by:
I would like to achieve an effect similar to the code outlining in vs.net (where you can expand and collapse sections of code) inside of a textarea in a web form. the code outlining would be...
0
by: PawelSokolowski | last post by:
Hi all, As I see, in VS2008, outlining still sucks, like in previous versions. Outlining is still not preserved between sessions. Why did they do it after all, without saving it's useless. I...
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: 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
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?
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...
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...
0
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...
0
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,...

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.