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

Cutting fieldsets down to size


Fieldsets, as introduced with, I think, HTML 4, tend to span
the entire width of the window.
As most (all?) "Block", or so, elements do...

What I would like, however, is a solution do cut them down,
so they surround their content, obviously, but not more than needed.

Specifying a width like "50%" seems to apply to the container
width too, which would again be the window,
and not very flexible since it ignores the content entirely...

One could, of course, put them inside a table's "td",
but that's not a solution :)
Just in case you need an example "fieldset"-page:
http://webplaza.pt.lu/dostert/fieldset.htm
Hope to have been clear :)
Yours
P

--
The intellect, as a means for the preservation of the individual,
unfolds its chief powers in simulation.
- Friedrich Nietzsche (1844-1900) -

Jul 20 '05 #1
2 2997
PatD wrote:
Fieldsets, as introduced with, I think, HTML 4, tend to span
the entire width of the window.
AFAIK, yes. (I wouldn't use the word "span"; span is the name of a
tag that is not block-level, and just confuses things).
As most (all?) "Block", or so, elements do...
By default, yes.
What I would like, however, is a solution do cut them down,
so they surround their content, obviously, but not more than needed.
Use the width property.
Specifying a width like "50%" seems to apply to the container
width too, which would again be the window,
and not very flexible since it ignores the content entirely...
No no, specify it on the element. And don't use percent. Since it
will contain text labels, use em (or ex) units. Perhaps specify a
max-width if this stylesheet will be used with pda's or the like.

fieldset {
width: 8em ;
max-width: 95% ;
}
One could, of course, put them inside a table's "td",
but that's not a solution :)


Not for presentation, no. You could use display: table-cell, but that
doesn't work in IE, and width does.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2
On Wed, 10 Sep 2003 22:30:09 GMT, Brian
<us*****@mangymutt.com.invalid-remove-this-part> wrote:
PatD wrote:
What I would like, however, is a solution do cut them down,
so they surround their content, obviously, but not more than needed.


Use the width property.
Specifying a width like "50%" seems to apply to the container
width too, which would again be the window,
and not very flexible since it ignores the content entirely...


No no, specify it on the element. And don't use percent. Since it
will contain text labels, use em (or ex) units. Perhaps specify a
max-width if this stylesheet will be used with pda's or the like.

fieldset {
width: 8em ;
max-width: 95% ;
}


Indeed, works nicely. (Once you figure out the size in em of the content :).
It behaves well too on too small a window.

Thanks!
Yours
P

Jul 20 '05 #3

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

Similar topics

5
by: Liberal | last post by:
I am looking for the simplest forum, bbs script which has those features? new messages will be displayed only after the administrator reviewed allow users post without signing up display the...
3
by: Trent | last post by:
I'm trying to be a good little coder and design my HTML form with as much semantic HTML and CSS as possible. I'm using fieldsets, legends, and labels. It seems like the only way to reliably...
4
by: andrew | last post by:
Hi, Let me know if I should ask this in a microsoft jscript group instead as the problem I'm witnessing only seems to appear in IE. Or if you can recommend another group if this is not an...
2
by: tpaulson | last post by:
I have a couple of DIV's that I hide/display based on radio buttons. On the DIV's, I have multiple drop down boxes. The source shows that they are populated, but I can't make them drop down. Only...
4
by: Matt Haggard | last post by:
I'm using PIL (Python Imaging Library) to generate button images. They consist of a left end image, a middle, repeating image and a right side image.... anyway, that's not important I'm using a...
1
realin
by: realin | last post by:
hi guys, i wanna set my fieldsets properly without using table.. like two fields in one row... here are my fieldsets.. <fieldset> <legend>Personal Information</legend>...
5
by: Roger | last post by:
I have a siebel crm application thats cutting and archiving logs every minute. Here is the db cfg Log buffer size (4KB) (LOGBUFSZ) = 512 Log file size (4KB) ...
2
jlm699
by: jlm699 | last post by:
Greetings all, I'm using a PHP-based web page to access an SQL database containing logs which has grown quite large over time. A few weeks ago I recieved the following error: "Fatal error: Allowed...
2
by: registry | last post by:
<%@Language="VBSCRIPT" CODEPAGE="1252"%> <html> <head> <title>Registry Network Hospital Detail</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script...
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: 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
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...

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.