Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Just one scroll in a Frame??

Reply
Thread Tools

Just one scroll in a Frame??

 
 
Daniele
Guest
Posts: n/a
 
      06-30-2004
How can I have only one scrollbar in a frame (they appear both
simultaneously even if the content exceed only vertically and not
horizontally)?
Can I do it with javascript??
Thanks for any advice.
bye


 
Reply With Quote
 
 
 
 
SpaceGirl
Guest
Posts: n/a
 
      06-30-2004
Daniele wrote:

> How can I have only one scrollbar in a frame (they appear both
> simultaneously even if the content exceed only vertically and not
> horizontally)?
> Can I do it with javascript??
> Thanks for any advice.
> bye
>
>


Set scrolling to auto and that will only display the scrollbars that are
required. Also, make sure your content is kept away from the edges of
the frame. Best trick is to place your content inside an DIV which is 20
pixels narrower than the frame in which it sits.

You need to try it on a few browsers too, as the results vary. Also, if
IE is rendering XHTML, you may find that in some pages you just cannot
turn off the extra scrollbar - this is because IE has problems rendering
XHTML. If you can avoid frames and use scrollable layers, IE handles
this a little better when rendering XHTML.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      06-30-2004
SpaceGirl <(E-Mail Removed)> wrote:
>Daniele wrote:
>
>> How can I have only one scrollbar in a frame (they appear both
>> simultaneously even if the content exceed only vertically and not
>> horizontally)?

>
>You need to try it on a few browsers too, as the results vary. Also, if
>IE is rendering XHTML, you may find that in some pages you just cannot
>turn off the extra scrollbar - this is because IE has problems rendering
>XHTML.


It's got bothing to do with XHTML. It's got everything to do with
doctype sniffing. If your doctype (of the framed page, not the
frameset) triggers Standards mode then IE will show both scrollbars,
if it triggers Quirks mode then it will only show scrollbars as
needed.

Look at http://steve.pugh.net/test/test40.html
The upper frame is XHTML but triggers Quirks mode, the lower frame is
HTML but triggers Standards mode.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
SpaceGirl
Guest
Posts: n/a
 
      06-30-2004
Steve Pugh wrote:

> SpaceGirl <(E-Mail Removed)> wrote:
>
>>Daniele wrote:
>>
>>
>>>How can I have only one scrollbar in a frame (they appear both
>>>simultaneously even if the content exceed only vertically and not
>>>horizontally)?

>>
>>You need to try it on a few browsers too, as the results vary. Also, if
>>IE is rendering XHTML, you may find that in some pages you just cannot
>>turn off the extra scrollbar - this is because IE has problems rendering
>>XHTML.

>
>
> It's got bothing to do with XHTML. It's got everything to do with
> doctype sniffing. If your doctype (of the framed page, not the
> frameset) triggers Standards mode then IE will show both scrollbars,
> if it triggers Quirks mode then it will only show scrollbars as
> needed.
>
> Look at http://steve.pugh.net/test/test40.html
> The upper frame is XHTML but triggers Quirks mode, the lower frame is
> HTML but triggers Standards mode.
>
> Steve
>


So it has got to do with XHTML... sort of?

...or at least, whichever mode IE chooses to use to render the page.
Standards mode IE (XHTML content) = scrollbars. Same in Mozilla or
Firefox = no scrollbar. IE hates the application/xhtml+xml doctype, yes?

I hate IE


--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      06-30-2004
SpaceGirl <(E-Mail Removed)> wrote:
>Steve Pugh wrote:
>> SpaceGirl <(E-Mail Removed)> wrote:
>>>Daniele wrote:
>>>
>>>>How can I have only one scrollbar in a frame (they appear both
>>>>simultaneously even if the content exceed only vertically and not
>>>>horizontally)?
>>>
>>>You need to try it on a few browsers too, as the results vary. Also, if
>>>IE is rendering XHTML, you may find that in some pages you just cannot
>>>turn off the extra scrollbar - this is because IE has problems rendering
>>>XHTML.

>>
>> It's got nothing to do with XHTML. It's got everything to do with
>> doctype sniffing. If your doctype (of the framed page, not the
>> frameset) triggers Standards mode then IE will show both scrollbars,
>> if it triggers Quirks mode then it will only show scrollbars as
>> needed.
>>
>> Look at http://steve.pugh.net/test/test40.html
>> The upper frame is XHTML but triggers Quirks mode, the lower frame is
>> HTML but triggers Standards mode.

>
>So it has got to do with XHTML... sort of?


No.
My example could equally have used two XHTML pages or two HTML pages,
or HTML in quirks mode and XHTML in standards mode.

>..or at least, whichever mode IE chooses to use to render the page.
>Standards mode IE (XHTML content) = scrollbars.


Standards mode = scrollbars.
Whether the document that triggers standards mode is HTML or XHTML is
totally, 100%, irrelevant.

IE doesn't care. IE doesn't even know what HTML and XHTML are. All it
sees is a mess of tags and it looks at the first line of the document
to determine whether it's going to use standards or quirks mode to
render the document.

>Same in Mozilla or Firefox = no scrollbar.


Neither frame in this specific test showed a horizontal scrollbar in
anything other than IE. But there are other conditions that can
trigger unexpected horizontal scrollbars.

>IE hates the application/xhtml+xml doctype, yes?


IE simply doesn't know what it is and so offers the user to download
the file, just like any other unknown data format.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      06-30-2004
On Wed, 30 Jun 2004 11:40:12 +0100, SpaceGirl
<(E-Mail Removed)> declared in alt.html:

> IE hates the application/xhtml+xml doctype, yes?


application/xhtml+xml is not a doctype, it's a mime type. Very
different. And yes - IE doesn't understand it, so it won't actually
display the page, just ask you to download the file.

--
Mark Parnell
http://www.clarkecomputers.com.au
"Never drink rum&coke whilst reading usenet" - rf 2004
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable Scroll up and scroll down in CR-report Sathiamoorthy ASP .Net 1 11-28-2006 11:42 PM
Listbox disabled - cant scroll in IE - can scroll in Firefox =?Utf-8?B?Ui5OaWprYW1w?= ASP .Net 0 11-22-2006 03:46 PM
Using a div with scroll bars - can we get the scroll bars on the left instead of the right side? UJ ASP .Net 1 11-01-2006 09:32 PM
change the scroll speed of a scroll pane? Kevin Java 1 02-05-2005 09:42 AM
prevent mouse scroll to scroll in a dropdownlist nicholas ASP .Net 0 12-07-2004 11:26 AM



Advertisments