Click to See Complete Forum and Search --> : Lynx Viewer & DIV


jeffmott
04-10-2003, 06:44 PM
Does anyone know why nested DIVs do not appear to be block level in the lynx viewer? Example:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html lang="en-us">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
</head>

<body>

<div>hello</div>
<div>world</div>

</body>

</html>Output:hello
world<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html lang="en-us">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
</head>

<body>

<div>
<div>hello</div>
<div>world</div>
</div>

</body>

</html>Output:helloworld

Klyve1
04-12-2003, 10:12 AM
I'd say that unless there is a 'break' between them you shouldn't see anything other than you already do.

Why the DIV anyway? They're redundant in this case!

jeffmott
04-12-2003, 10:30 AM
I'd say that unless there is a 'break' between them you shouldn't see anything other than you already doMaybe you could tell me what you're considering to be a break, considering in both cases they're enclosed in their own block level elements.Why the DIV anyway? They're redundant in this case!That's why it's called an example. It's not supposed to be meaningful, only to illustrate the point.

Klyve1
04-12-2003, 10:37 AM
Ooops, sorry, having a bad day!

Which version of Lynx?

jeffmott
04-12-2003, 10:48 AM
An emulation of Lynx 2.7.1
http://www.delorie.com/web/lynxview.html

Klyve1
04-12-2003, 10:52 AM
OK - as v2.8.3 has this as a part of its improvement of HTML interpretation
since DIV is a block element, make sure its contents do not get rendered inline, even for nested DIVs that don't change text alignment. Try to avoid improperly kept change of DIV styles' alignment by a <P> or </P> in its content
I'd say DIV's don't render correctly prior to this version