473,756 Members | 8,168 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE6, xhtml, scrollbars and you

Okay, you are all so smart in here. Answer me this:

IE6 in standards mode doesn't seem to hide scrollbars on the body element
(overflow:hide) Ain't this a quandary. I have it in my head that I need to
specify html instead. The scrollbars do hide on Gecko browsers though, so
there is definitely a disagreement among browser developers on how to
implement scrollbars (as a side note, Gecko browsers with their notoriously
bug-ridden resize code seem to always screw up when asked to stretch and
scroll divs, even when the page is reloaded on every resize!)

My first thought is to modify the CGI that generates the style sheet as I
already have code that deprecates the document type when hidden scroll bars
are required on IE6 (but not IE5.) This is based on the simple empirical
evidence that the scroll bars are still there on IE6 in standards mode, so
the optimal document type (XHTML strict) cannot be used. So I could just
change this to output an html style (rather than a body style) for IE6 and
lose the deprecation (it wouldn't be needed at this point.)

So the question is this. Given that CGI-based processing of browser
versions for these kinds of tweaks is taboo, what would you check on the
client side before dynamically generating the style for the body and/or html
element? It doesn't seem like you could just send both as this would surely
break some older browsers (I know you can do tricks with comments and such,
but that only works for NS4 and maybe IE3 AFAIK.)

documentElement is the only thing I can think of that indicates standards
mode and NS6/Mozilla support this AFAIK.

IE Conditional comments perhaps? I would hate to hard-code a test for a
browser version number into the actual document (for obvious reasons), but I
guess it is an alternative if the browser version is exposed to these
things.

I don't see any other way to deal with a situation like this than with
server-side code that looks at the browser's version number and makes the
necessary adjustment. And there are lots of little differences like this
that just don't seem to have viable client-only solutions. There's DirectX
stuff (probably is an object detect for that) and funky colored scrollbars
(hey people ask for them) and document margins (Opera did them slightly
differently than the rest as I recall) and now this scrollbar thing.

Oh well. If there is a definitive client-only answer to all of this then I
would love to hear it! Otherwise, any thoughts on the #$@% scrollbars is
appreciated.

All the best,
Michael Jibbering
Jul 20 '05
24 4724
On 04 Sep 2003 18:28:41 +0200, Lasse Reichstein Nielsen
<lr*@hotpop.com > wrote:
I have yet to see a browser that makes a difference in its CSS rendering
between XHTML 1.0 Strict and HTML 4.01 Strict.
nor me.
Actually, I have yet to see a browser that supports XHTML and not HTML,
although I can believe that they exist for specialized uses.
XSmiles, DENG, bothl render some XHTML elements within wider XML
situations, but don't necessarily render HTML. XSmiles is even
scriptable...
There is nothing inherent in XHTML that makes it better or worse than HTML
at separating style from content. It just happens that the move away from
physical markup happened about the same time as XHTML.


well it was rediscovered then, it was also being done years before in
viola IIRC.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #21
DU
Nobody wrote:
"DU" <dr*******@hotR EMOVEmail.com> wrote in message
news:bj******** **@news.eusc.in ter.net...
| Lasse Reichstein Nielsen wrote:
| > "Nobody" <no**@nope.ne t> writes:
| >
| >
| >>Okay, you are all so smart in here. Answer me this:
| >>
| >>IE6 in standards mode doesn't seem to hide scrollbars on the body
element
| >>(overflow:hid e)
| >
| >
| > I assume you mean "overflow:hidde n".
| > (<URL:http://www.w3.org/TR/CSS2/visufx.html#ove rflow>)
| >
|
| God would have known that it was hidden, not hide. :)

God would be clever enough to marshal an entire newsgroup to solve an
obscure CSS problem (off-topic too!)

Not off-topic at all. Since you arrived in this newsgroup, you've
resorted to name-calling, abrasive remarks, unprovoked, uncalled and
unjustified ad hominem arguments and you even self-proclaimed yourself
as a God by saying:
"You are talking to God when it comes to browser detection and backward
compatibility issues."
In no way these discussion manners are promoting your opinions: it just
discredibilizes you.

Open up your mind a little and be a mite more modest here. We (if not,
an entire newsgroup at *your* service) are answering your questions to
the best of our abilities, you know. Some of the regulars in this
newsgroup are pretty good in their respective fields of expertise, you
see. We all can learn with civilized and moderated tone of discussion.

Counter the arguments, thougths, ideas if you feel justified: don't
attack the people forwarding arguments. Otherwise you're defeating for
yourself and others one of te purpose of newsgroup usenet.
|
| > There is no overflow on the body element by default, as it hasn't got
| > a fixed height.
|
| Since I'm not God ;p I'll risk that the browser default css overflow
| declaration on the body element in all browsers is visible.

Of course it is. And what does that have to do with the price of beans in
Somalia?

|
|
| The overflow you might want is on the html element:
| > html {overflow:hidde n;}
|
| This is debattable. MSIE 6 for windows has the browser default
| overflow:scroll for the root element. So, you would need to use
| overflow:visibl e or overflow:auto instead.

No. Those would do the opposite. We want to hide the scrollbars and though
I haven't yet modified my stuff to use html instead of body, I am quite sure
that will do the trick.

Why would you want to hide the scrollbars if content overflows window
dimensions? In what way is this promoting accessibility to content? I
can understand hiding scrollbars (turning off html {overflow:scrol l;} in
MSIE 6 in standards mode) when content does NOT overflow window
dimensions though.
|
| > Remember that in standards mode, the root of the document tree is
| > document.docume ntElement (corresponds to the html tag), not
| > document.body.
| >
| >
| >>Ain't this a quandary. I have it in my head that I need to
| >>specify html instead. The scrollbars do hide on Gecko browsers though,
so
| >>there is definitely a disagreement among browser developers on how to
| >>implement scrollbars
| >
| >
| > There is no standards governing the browser interface, only the
rendering
| > of the page. There is no rule that requires the scrollbars on the
viewport
| > to correspond to any overflow property.
|
| Yes and no. It would be quite suicidal not to implement scrolling of
| some sort in case of overflow.

Unless the style of the document overrides it.

In IE only. Browser viewport does not correspond to any HTML element
which you can style in most non-IE browsers. The root element is not the
viewport in most non-IE browsers regardless of rendering mode.

html {width:1200px; overflow:hidden ;}
will create a vertical scrollbar in Opera 7.20 for users with a 1024x768
or smaller scr. res. It should also create a vertical scrollbar in NS
7.1 and Mozilla 1.4+ but it's not and that is a bug IMO.
|
| "When the viewport is smaller than the document's initial containing
| block, the user agent should offer a scrolling mechanism."
| http://www.w3.org/TR/CSS2/visuren.html#q2
| http://www.w3.org/TR/CSS21/visuren.html#q2
|
|
| So yes, there is disagreement.
| >
| >
| >>This is based on the simple empirical evidence that the scroll bars
| >>are still there on IE6 in standards mode,
| >
| >
| > It is the standards mode that trips you up, because it doesn't work
| > as quirks mode.
| >
| >
| >> so the optimal document
| >>type (XHTML strict) cannot be used. So I could just change this to
| >>output an html style (rather than a body style) for IE6 and lose the
| >>deprecation (it wouldn't be needed at this point.)
| >
| >
| > You should not make new pages to quirks mode. It is there for backwards
| > compatability with badly written pages aimed at pre-standard browsers.
| > Not a group you will want your page to be associated with.
| >
|
| I think he has a point. The problem is that if there is no content
| overflow, in standard compliant rendering mode, a vertical scrollbar
| will appear... for no reason.

Yes. That is what I am getting at. Except that when using overflow:hidden ,
scrollbars should not appear, regardless of overflow. I use scroll bars on
divs instead. The idea is to take up all available real estate and it works
like a charm in IE and like a slug in Gecko (I quit trying to do this trick
on Gecko-based browsers.)

[snipped]

Because browser viewport (scrollbars appearing or not) is controlled
independently of html elements and css.
|
| html {overflow:auto; }
|
| and then a miracle will happen with the scrollbar. Jesus, I wish God
| could take care of a few thousands bugs in MSIE 6 and make the release

No shit. I already said that in the original post and it was confirmed by
another poster. The thread has been over since yesterday.


I read your original post and all others which followed and did not see
such proposal anywhere.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #22
| old browsers. It's what you send to new browsers that is discussed.
| You chose to send XHTML, and I say that you can send Strict HTML
| instead. With the same CSS code, the two will render identically.
| Using strict HTML can give a smaller result than Strict XHTML.

Why would I send HTML Strict to NS6 or 7. I just don't understand why I
would go backward like that.

|
| > Everything else I want deprecated so that there is
| > no question it will look/feel identical to the XHTML version.
|
| That sounds backwards to me. You want to use as different methods
| as possible, in order to ensure that the results look the same.

I have to use the old appearance attributes with older browsers. There's
just no way around that (ex. IE2) Conversely I use the most modern methods
on newer browsers. And yes they look the same across many platforms and
browsers (far more than if I just sent out strict stuff.)

|
| > For instance, IE2 or NS1 will change the look of my pages if I rely
| > strictly on CSS for layout.
|
| Obviously, since they don't understand CSS at all.
|
| > Why do I care? Because there are millions of browsers out there
| > and you have to have a fallback to support unknown entities and entities
| > that are explicitly unable to comply with the latest and greatest
versions
| > of HTML.
|
| If you meet an unknown browser, what do you send: The deprecated tag soup,
| or standards compliant code? I would chose the latter, since new browsers
| appearing these days will be more likely to support standards than being
| bug compatible with IE 4.

I don't know where IE4 entered into it. You lost me there. But I think
that a totally unknown browser is a quandary. If you send the latest, you
assume that it can support CSS properly. That is quite a leap of faith!

|
| > Can be, but why would I generate such code? For whom?
|
| I don't know. My only beef was with the statement that XHTML gave more
| compact code than HTML. It doesn't, unless you make bloated HTML code.
|
| > What does that mean? The attributes that are deprecated in HTML4.01
usually
| > have a CSS equivalent that will work with XHTML (which makes perfect
sense
| > to me as XHTML seperates style from content, which requires CSS to make
it
| > work.)
|
| XHTML does no such thing.
| XHTML 1.0 Transitional is completely equivalent to HTML 4.01 Transitional.
| It separates no more or less.

Strict vs. loose rather than XHTML vs. HTML. Right.

|
| There is nothing inherent in XHTML that makes it better or worse than HTML
| at separating style from content. It just happens that the move away from
| physical markup happened about the same time as XHTML. It actually started
in
| HTML with the deprecation of tags and attributes used for layout, but
| as the evolution of HTML was moved to XHTML, the fruits of that
deprecation

Right. I know about that. That is why I use HTML4.01 loose as a fallback.
It still validates with the height, width and align attributes.

| (total abandonment of the deprecated parts) only occured in XHTML 1.1.
|
| > So if you want to output table-based layouts (for intance) in XHTML,
| > your CGI must output different styles to handle things like stretching
cells
| > to fit the screen. In HTML, this is done with the width attribute (in
4.01)
| > and the height attribute (invalid even in 4.01, so my fallback layouts
never
| > stretch vertically.) Does that makes sense to you?
|
| Not really.
|
| Maybe one reason is that I don't want pages to look the same in all
| browsers. The web is not paper, and the only type of design that will
| work consistently across as diverse platforms as home computers,
| mobile phones and speech syntesizers, is a fluid one. Call me an
| idealist.

Mine is about as fluid as you can get. It oozes over all available browser
real estate that it can find. My point is that I don't want to lose that
(and other) functionality on browsers that do not support style sheets. It
is bad enough that one stupid bug in Gecko short-circuits these aspirations
on Netscape and Mozilla.

|
| Still, the point was: XHTML is not more compact than HTML. You can
| transform any XHTML page into an equivalent and probably smaller
| HTML page.

But to what end? Shouldn't we be moving forward? I see they now have a
thing called XHTML Basic that will be the next big thing. I suspect my
engine will convert to that in five minutes and be serving XHTML Basic
enabled agents immediately thereafter. I think it is a sound strategy to
keep up with what w3c is proposing. Maybe I'm wrong...
|
| /L
| --
| Lasse Reichstein Nielsen - lr*@hotpop.com
| Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
| 'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #23
On Thu, 04 Sep 2003 17:43:57 GMT, "Nobody" <no**@nope.ne t> wrote:
| old browsers. It's what you send to new browsers that is discussed.
| You chose to send XHTML, and I say that you can send Strict HTML
| instead. With the same CSS code, the two will render identically.
| Using strict HTML can give a smaller result than Strict XHTML.

Why would I send HTML Strict to NS6 or 7. I just don't understand why I
would go backward like that.
Because HTML 4.01 is the only thing you can correctly send with the
mime type text/html without doing obscure Appendix C shenanigans, and
even then certain parts of Appendix C are definitively wrong (it
allows you to use meta to set the charset, ignoring the text/*
default.) Sending XHTML as text/html is a hack, and a difficult one
to justify, since XHTML 1.0 is exactly as expressive as HTML 4.01,
it's just a reformulation.

There's my reasons for not, what are your reasons for, I've still yet
to see any.
If you send the latest, you
assume that it can support CSS properly. That is quite a leap of faith!
Equally the assumption that it supports FONT say is just as much a
leap of faith, new browsers like X-Smiles and DENG, do not support
FONT, but do support CSS...
| Still, the point was: XHTML is not more compact than HTML. You can
| transform any XHTML page into an equivalent and probably smaller
| HTML page.

But to what end? Shouldn't we be moving forward?
Sure, RDF, MATHML, SVG lots of formats full of richer semantic meaning
than HTML all well worth using to mark up content, but XHTML as no
extra semantic meaning, may be useful in the future to integrate with
the above technologies, but certainly not relevant now, and if you
have valid HTML content you can convert it to XHTML any time you want
with TIDY.
I see they now have a
thing called XHTML Basic that will be the next big thing.


Sure, but you won't be able to serve it as text/html, so it's pretty
irrelevant to authoring for web-browsers today.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #24
"Nobody" <no**@nope.ne t> writes:
Why would I send HTML Strict to NS6 or 7. I just don't understand why I
would go backward like that.
Jim Ley has good arguments. I'll just say: It can make shorter code.
I have to use the old appearance attributes with older browsers. There's
just no way around that (ex. IE2)
I have been known to overdo things too, but still ... do you actually
know the person who still uses IE2? I bet there are more people using
W3 (or even the amazing Lynx) as a browser than there are using IE2.
Conversely I use the most modern methods on newer browsers. And yes
they look the same across many platforms and browsers (far more than
if I just sent out strict stuff.)
What is the difference between sending XHTML 1.1 and HTML 4.01 Strict
(using the exact same tags and attributes as the XHTML version), and
using the same style sheets? Can you mention one browser where it
makes a difference?
I don't know where IE4 entered into it. You lost me there. But I think
that a totally unknown browser is a quandary. If you send the latest, you
assume that it can support CSS properly. That is quite a leap of faith!
No more a leap of faith than assuming it supports anything else. I
like to err on the side of standards. Maybe because I want to reward
the browsers that do follow standards.
| Still, the point was: XHTML is not more compact than HTML. .... But to what end?
I never said there was an end. I just said that the statement that XHTML
was more compact than HTML was misleading.
Shouldn't we be moving forward?


Absolutely. I write XHTML too. And often, I don't look back. That is a
luxury I can afford because I don't make money on my pages.

I want the world where I can write to standards and not care what
browser people use. As it is now, I still consider how the page
degrades if standards are not supported well. I don't want the page to
look the same on all browsers. On old browsers, browsers that I want
to be gone from the browserscape, I settle for the page being usable.
I doesn't even have to be pretty. I consider that moving forward.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #25

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

Similar topics

2
2445
by: Konrad Koller | last post by:
For a card playing game I constructed a layout of 49 playing cards (size of each: x=71, y=96) which are arranged in a 7X7 matrix side by side. Accordingly the pysical size of the Canvas is x=71*7, y=96*7: in the main program: canvas=QCanvas(497,672) class Board(QCanvasView): def __init__(self,canvas,parent): QCanvasView.__init__(self,canvas,parent)
6
11488
by: adrien | last post by:
Hi, (also posted in netscape.public.mozilla.browser) i use netscape 7 and want to hide the scrollbars of the window when something happens. I tried this: window.scrollbars.visible=false window.scrollbars.visibility="no" .... nothing works Is it also possible only to hide the vertical scrollbar instead of both?
5
4357
by: Dennis M. Marks | last post by:
My script opens a window that is supposed to be resizable and scrollable. I am on a Mac. With IE 5.1.7 it works fine. With Netscape 6 there is no scroll bar. I am able to resize it smaller than the page but scrollbars still do not appear. What am I doing wrong. Is this just a bug in the Mac version of Netscape. Please let me know if the popup window is scrollable on your platform and do you see a problem with my code. The page is...
14
2293
by: Jorg Matter | last post by:
Hello I should like to define the colors of the scrollbars for divs with overflows set to auto. I have a design with black background and white text. Now the scrollbars do not look very nice and I should like to have them some sort of dark grey or so. Where and how do I define these colors? Jörg
1
3748
by: Andi Plotsky | last post by:
I have a subform where I dynamically change the SourceObject dependent upon the User's response to questions on the Main form. My problem is that the scrollbars do not show up on either the Main Form or the Subforms (except for on the opening form, but it doesn't scroll past the top viewable items). If I look at any of the forms separately, the scrollbars do show up and function just fine. The longest subform is 15", and so I have set...
1
3675
by: Fabrício de Novaes Kucinskis | last post by:
Hi all, I have to problems concerning datagrids, tabcontrols and scrollbars: 1) I created a form with a TabControl. This TabControl has two TabPages: the first with a datagrid to browse database records and the second with some controls (TextBoxes, OptionButtons...) to edit these records. When the second tab is shown and I use the DataGrid's SetDataBind method, the grid scrollbars are disabled.
5
1247
by: Mark | last post by:
I am struggling with a CSS2 layout problem, I am using Visual Web Developer 2005 Express. My website needs to be constrained within the visible viewport. This means that scrollable content will be contained within a scrollable DIV - the problem I have is in giving this DIV a certain height and width of it's containing DIV. For instance... <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
17
2093
by: Dino M. Buljubasic | last post by:
I have a treeview and a checked list view controls one beside another. I want to make them work so that when I scroll down or up one of them the other does the same. Any help will be appreciated -- Dino Buljubasic Software Developer http://rivusglobal.com
2
2405
by: needin4mation | last post by:
Does anyone know what would cause a popup with scrollbars=1 to suddenly lose its scrollbars? I have a popup from window.open (....scrollbars=1..) and it used to be a normal window that would have it scrollbars. Now, at least on some machines, not all, the scrollbars are nor present. The user has to click on the screen and drag the mouse to move the webpage down. Any ideas? Thank you for any help.
0
9117
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9894
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9679
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8542
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4955
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3651
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3141
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2508
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.