WebTV Viewer and HTML display

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a page that is valid XHTML, and I'm currently working on some
cross-browser compatibility features.

Currently, I have a background image, and a div with a width value of 50%
and a float value of right. (For a quick view, see
http://www.biohorror.info/index-fly2.htm).

For some reason, in the WebTV Viewer, the div (which contains all the text)
is compressed into perhaps 10% of the screen at the far left (and therefore
virtually unreadable). I've looked at the WebTV specs, and at my code, and
can't figure out where the glitch is.

Has anyone else run into this? Can you help?

Thanks!

Pam
 
Have you look at the requirements/limitations for WebTV?

http://developer.msntv.com/Tools/WebTVVwr.asp
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Yes. In fact, I've reviewed http://developer.msntv.com/Develop/HTML.asp for
HTML and http://developer.msntv.com/Develop/CSS.asp for CSS, and don't see
anything that should be causing the problem. DIV is supported, as is width.
And if I understand correctly, unsupported properties and values such as
float: right (which I do use) should be ignored, but shouldn't render as 10%
left.

I don't see an obvious problem nor an obvious workaround (well, except
browser sniffing, and I'm trying to avoid that).
 
I don't see anything that specifically states what happen when un-supported properties/values
encountered.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
I've narrowed it down to the width property. According to the requirements,
percentage widths should be supported:

"Elements that have no special behaviors are fully supported."
(http://developer.msntv.com/Develop/Elements.asp)

and

"All Color, Length, and Percentage units are supported."
(http://developer.msntv.com/Develop/CSS.asp)

However, pixel widths do work, but percentages (or at least 50% divs) don't.

Any suggestions for a workaround would be very welcome. Otherwise, I think
I'll have to resort to browser sniffing. Ah, well.
 
I have no suggestion for workaround, as I rarely use CSS, other than basically setting of hyperlink
colors. I stay very close to HTML 3.2 guidelines.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
You still use font tags?
ETC
Thomas A. Rowe said:
I have no suggestion for workaround, as I rarely use CSS, other than
basically setting of hyperlink colors. I stay very close to HTML 3.2
guidelines.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Yes, and I see no real advantage for using CSS to define fonts and I don't have any problems change
fonts site wide if needed. I main use ASP/VBScript to define items that may need to be change site
wide later.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
For those of you who are interested in a resolution to the problem:

WebTV support of CSS is very inconsistent. For example, it supports @import,
but not the media attribute, so any call using the media attribute had to be
embedded in the JavaScript to keep WebTV from using that stylesheet and not
the WebTV stylesheet (which, of course, couldn't be called using the media
attribute).

In the end, this is what I came up with, and it seems to work.

<script type="text/javascript">
<!--
if (navigator.userAgent == "Mozilla/4.0 WebTV/2.6 (compatible; MSIE 4.0)") {

document.write("<link rel=\"stylesheet\" type=\"text/css\"
href=\"webtv.css\" />"); }
else {
document.write("<style type=\"text/css\">@import
\"style.css\";</style><link rel=\"stylesheet\" type=\"text/css\"
media=\"print\" href=\"print.css\" />"); }
// -->
</script>
 
I started developing for WebTV on 'day one' but have not been doing so for a
couple of years now.
IMO this whole issue will soon be rendered mute. On December 31, 2005 the
entire television broadcasting industry will be required by law to broadcast
using digital signals -- no more analog -- and that in turn will usher in a
new era of web development capabilities. Granted it does not resolve the
present concerns, the point being however not to put too much time into
optimizing elegant designs for MSN TV until the emerging possibilities
become clear.
 
Very good point, Clinton.

I'm not so much concerned with an "elegant" design for WebTV as preventing
my otherwise cross-browser, cross-platform site from breaking entirely in a
WebTV browser.

After 12/2005, I hope I won't ever have to think about it again!
 
@import seems to work more consistently, so here's the tweaked code:

<script type="text/javascript">
<!--
if (navigator.userAgent == "Mozilla/4.0 WebTV/2.6 (compatible; MSIE 4.0)") {

document.write("<style type=\"text/css\"><!-- @import \"webtv.css\";
//--></style>"); }
else {
document.write("<style type=\"text/css\"><!-- @import \"style.css\";
//--></style><link rel=\"stylesheet\" type=\"text/css\" media=\"print\"
href=\"print.css\" />"); }
// -->
</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top