This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > July 2007 > overflow style for fieldset doesn't work?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
overflow style for fieldset doesn't work?
|
|
| Zhang Weiwu 2007-07-04, 10:14 pm |
| Dear list,
I am confused that "overflow: auto" doesn't seem to work for Firefox?
I might have hit a problem that every experienced web developer knows,
but unfortunately I tried a few keyword combination not able to find
articles about this on google.
Below example illustrate the problem, the screenshot of how it look is
here: gopher://sdf.lonestar.org/I/users/weiwu/screenshot.png.
Is it possible to make fieldset behave like any other block element that
display scrollbar inside of it?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample Fieldset</title>
</head>
<body>
<fieldset style="height: 3ex; overflow: auto;">
The quick brown fox jumps over a lazy dog. <br/>
The quick brown fox jumps over a lazy dog. <br/>
The quick brown fox jumps over a lazy dog. <br/>
The quick brown fox jumps over a lazy dog. <br/>
The quick brown fox jumps over a lazy dog. <br/>
</fieldset>
</body>
</html>
Thanks and best regards!
Zhang Weiwu
| |
| Jukka K. Korpela 2007-07-05, 6:18 pm |
| Scripsit Zhang Weiwu:
> I am confused that "overflow: auto" doesn't seem to work for Firefox?
I'm not surprised at that observation, since fieldset elements have special
features in their rendering, not describable in current CSS and probably
implemented using routines that are not fully controllable via CSS.
> Below example illustrate the problem, the screenshot of how it look is
> here: gopher://sdf.lonestar.org/I/users/weiwu/screenshot.png.
You should post the http URL of the page, not a screenshot. And Gopher has
been dead for years; new browsers may lack all support to the gopher:
protocol.
> Is it possible to make fieldset behave like any other block element
> that display scrollbar inside of it?
Well, if browsers don't want that, what can we do? We can try a workaround
like using a div element inside the fieldset and assigning styles to it. But
why would you do that? Why should a fieldset be separately scrollable and
not just part of a page that is scrollable if needed, as web pages are by
default?
> <fieldset style="height: 3ex; overflow: auto;">
> The quick brown fox jumps over a lazy dog. <br/>
That's a syntax error: a fieldset element must contain a legend element. And
what's the point in a fieldset element that only contains plain text and
line breaks?
The height of 3ex is most probably too small anyway - it can hardly contain
more than the scroll bars.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
| |
| Zhang Weiwu 2007-07-06, 3:50 am |
| 于 Thu, 05 Jul 2007 22:41:34 +0300,Jukka K. Korpela写到:
> Scripsit Zhang Weiwu:
>
>
> I'm not surprised at that observation, since fieldset elements have special
> features in their rendering, not describable in current CSS and probably
> implemented using routines that are not fully controllable via CSS.
Quite informative! Although I am not sure what part of fieldset is
impossible to layout with CSS. I'll search around to see if I can find
some insight of this special element. Actually this is the first element I
heard people saying not describable with CSS. I thought every element can.
>
> Well, if browsers don't want that, what can we do? We can try a
No, we can do nothing, but ask the usenet to see if some experts can tell
it's my mistake in my code or truly browsers don't want that. And now I
got the answer:) I should say thank you!
> workaround like using a div element inside the fieldset and assigning
> styles to it. But why would you do that? Why should a fieldset be
> separately scrollable and not just part of a page that is scrollable if
> needed, as web pages are by default?
Because of stupid customer requirements. Have you ever worked with picky
customers? Or you build website only for yourself or for fun, then you
don't have any stupid requirement.
Well at least I know it's impossible. I'll wrap it in div now.
>
>
> That's a syntax error: a fieldset element must contain a legend element.
> And what's the point in a fieldset element that only contains plain text
> and line breaks?
The point is demonstration of my question. The real web page that has this
problem is more than 3000 lines long in source code and I over simplified
the problem wishing to save the time of people who wish to check a webpage
to help me.
>
> The height of 3ex is most probably too small anyway - it can hardly
> contain more than the scroll bars.
Yeah, for demonstration purpose too:)
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|