Vanishing box

G

Guest

Hello,
When the text in div.b is longer than width of page - width of div.a then it
dissapears. How can I make div.b take all the space in div.o (width: auto is
not working) and not dissapear?

Regards,
Talthen

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style>
..a {position: relative; height: 100%; float: left; width: auto; padding:
10px}
..b {position: relative; width: auto; overflow: hidden; float: left; padding:
10px; background-color: red}
..o {overflow: hidden; height: 100%; width: 100%; border: 1px ridge #0193DD}
</style>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
</head>
<body>
<div class="o">
<div class="a" align="left"><img src="menu.gif" height="90%"
alt="menu"></div>
<div class="b"><h3 align="center">dfg dgdsg dsfg sdfgs dsfg</h3>
gdsfgdf dfgdsfg sdfgsd dfgds dfg dfg dsfg dfg sdfg sdf
hhhhhhhhhhhhhhhhhhhhn hhhhhh h

</div>
</div>
</body>
</html>
 
B

Barbara de Zoete

When the text in div.b is longer than width of page - width of div.a
then it dissapears. How can I make div.b take all the space in div.o
(width: auto is not working) and not dissapear?

.b {position: relative; width: auto; overflow: hidden; float: left;
padding: 10px; background-color: red}
.o {overflow: hidden; height: 100%; width: 100%; border: 1px ridge
#0193DD}

What do you think 'overflow:hidden;' does?
<URL:http://www.w3.org/TR/REC-CSS2/visufx.html#propdef-overflow>
 
J

Jim Moe

When the text in div.b is longer than width of page - width of div.a then it
dissapears. How can I make div.b take all the space in div.o (width: auto is
not working) and not dissapear?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Use a complete DTD. Otherwise it is left to the browser's imagination
how to behave.
The Strict DTD is expected for new documents:

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

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top