im urgently in need of a word wrap kind of css tag that works for firefox...so the div stretches vertically when i type text...with out line breaks <p></p>
heres an example...try to add text to the nested div on the right..first in ie then in firefox...in ie the text doesnt stretch the box vertically...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body bgcolor="#ffffff">
<div id="Layer1" style="position:absolute; left:92px; top:17px; width:379px; height:223px; z-index:1; background-color: #D0D6E2; layer-background-color: #D0D6E2; border: 1px solid #ffffff;"></div>
<div id="Layer2" style="position:absolute; left:472px; top:17px; width:161px; height:411px; z-index:2; background-color: #D0D6E2; layer-background-color: #D0D6E2; border: 1px solid #ffffff
;">
<div id="Layer3" style="position:absolute; left:-1px; top:-1px; width:161px; z-index:1; background-color: #D0D6E2; layer-background-color: #D0D6E2; border: 1px solid #ffffff; word-wrap:break-word;">hhhhhhhhhhhllllllllllllllllllllllllllllllllllllll</div>
</div>
<center>
</body>
</html>Maybe use PRE tags, or look into the white-space property of CSS.well i already tried white space and that dont work..pre wont work either...i need in autoIf there is no whitespace in the text then it will run on forever and ever and not break.Paul is exactly right. Can you give us an example of where this problem is occurring -- or does it occur in the code you posted? According to the W3C's overflow and clipping properties, when an element is absolutely positioned, its inner elements may exceed its width if a width is set, otherwise the width may expand. See: <http://www.w3.org/TR/CSS2/visufx.html>.white-space: pre; and word-wrap:break-word; together do the same thing..it wraps in ie but in firefox the text just flows out of the box....That's because the text isn't supposed to wrap except when there is whitespace. If there is none, it's like putting an image that's larger than the containing element -- it spans outside of its boundaries. This is why the W3C created overflow and clipping properties; if you want that small of a width to have text that is much wider, you need to use the overflow property to add a horizontal scrollbar to the element.thx neway ill just make tables with css properties k..Originally posted by ilya
thx neway ill just make tables with css properties k..
Don't use tables; you'll end up having to redesign with CSS sooner or later.sumone needs to like remotedesktop with me and show how to do a good fluid div/css layout...im still new at div layouts so im having the overflow problem and div centering problem..I'd suggest taking some CSS tutorials on floats, since those are easier to use than absolute positioning and work better in a lot of cases. Check out the CSS directory (<!-- m --><a class="postlink" href="http://www.roderickhoward.com/cssdirectory/">http://www.roderickhoward.com/cssdirectory/</a><!-- m -->) for some excellent links on learning. Post here when you hit a wall and can't figure something out. We're here to help you, but I'm sure everyone will appreciate it if you do all you can to learn before asking a question or throwing your hands up in the air and saying you'll use tables. "function MM_" <------- Mark of the devil.
Can that damned thing make anything that works on a browser?iduno lol....Originally posted by Mr Herer
"function MM_" <------- Mark of the devil.
Can that damned thing make anything that works on a browser?
Those are usually, if not always, generated by DreamWeaver, if I'm not mistaken.they are...but what do they do?!? browser compatibility?!?Apparently NS4 causes problems when resized in some layouts - but I wouldn't be giving a CSS stylesheet to NS4 at all, anyway, since its CSS support is insignificant.
heres an example...try to add text to the nested div on the right..first in ie then in firefox...in ie the text doesnt stretch the box vertically...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body bgcolor="#ffffff">
<div id="Layer1" style="position:absolute; left:92px; top:17px; width:379px; height:223px; z-index:1; background-color: #D0D6E2; layer-background-color: #D0D6E2; border: 1px solid #ffffff;"></div>
<div id="Layer2" style="position:absolute; left:472px; top:17px; width:161px; height:411px; z-index:2; background-color: #D0D6E2; layer-background-color: #D0D6E2; border: 1px solid #ffffff
;">
<div id="Layer3" style="position:absolute; left:-1px; top:-1px; width:161px; z-index:1; background-color: #D0D6E2; layer-background-color: #D0D6E2; border: 1px solid #ffffff; word-wrap:break-word;">hhhhhhhhhhhllllllllllllllllllllllllllllllllllllll</div>
</div>
<center>
</body>
</html>Maybe use PRE tags, or look into the white-space property of CSS.well i already tried white space and that dont work..pre wont work either...i need in autoIf there is no whitespace in the text then it will run on forever and ever and not break.Paul is exactly right. Can you give us an example of where this problem is occurring -- or does it occur in the code you posted? According to the W3C's overflow and clipping properties, when an element is absolutely positioned, its inner elements may exceed its width if a width is set, otherwise the width may expand. See: <http://www.w3.org/TR/CSS2/visufx.html>.white-space: pre; and word-wrap:break-word; together do the same thing..it wraps in ie but in firefox the text just flows out of the box....That's because the text isn't supposed to wrap except when there is whitespace. If there is none, it's like putting an image that's larger than the containing element -- it spans outside of its boundaries. This is why the W3C created overflow and clipping properties; if you want that small of a width to have text that is much wider, you need to use the overflow property to add a horizontal scrollbar to the element.thx neway ill just make tables with css properties k..Originally posted by ilya
thx neway ill just make tables with css properties k..
Don't use tables; you'll end up having to redesign with CSS sooner or later.sumone needs to like remotedesktop with me and show how to do a good fluid div/css layout...im still new at div layouts so im having the overflow problem and div centering problem..I'd suggest taking some CSS tutorials on floats, since those are easier to use than absolute positioning and work better in a lot of cases. Check out the CSS directory (<!-- m --><a class="postlink" href="http://www.roderickhoward.com/cssdirectory/">http://www.roderickhoward.com/cssdirectory/</a><!-- m -->) for some excellent links on learning. Post here when you hit a wall and can't figure something out. We're here to help you, but I'm sure everyone will appreciate it if you do all you can to learn before asking a question or throwing your hands up in the air and saying you'll use tables. "function MM_" <------- Mark of the devil.
Can that damned thing make anything that works on a browser?iduno lol....Originally posted by Mr Herer
"function MM_" <------- Mark of the devil.
Can that damned thing make anything that works on a browser?
Those are usually, if not always, generated by DreamWeaver, if I'm not mistaken.they are...but what do they do?!? browser compatibility?!?Apparently NS4 causes problems when resized in some layouts - but I wouldn't be giving a CSS stylesheet to NS4 at all, anyway, since its CSS support is insignificant.