HighDots Forums  

Cutting fieldsets down to size

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Cutting fieldsets down to size in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PatD
 
Posts: n/a

Default Cutting fieldsets down to size - 09-09-2003 , 10:16 AM







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) -


Reply With Quote
  #2  
Old   
PatD
 
Posts: n/a

Default Re: Cutting fieldsets down to size - 09-11-2003 , 02:26 AM






On Wed, 10 Sep 2003 22:30:09 GMT, Brian
<usenet1 (AT) mangymutt (DOT) com.invalid-remove-this-part> wrote:

Quote:
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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.