/    Sign up×
Community /Pin to ProfileBookmark

word-wrap in firefox1.0pr

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…

[code]<!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>[/code]

to post a comment
CSS

15 Comments(s)

Copy linkTweet thisAlerts:
@JonaOct 14.2004 — [font=trebuchet ms]Maybe use PRE tags, or look into the white-space property of CSS.[/font]
Copy linkTweet thisAlerts:
@ilyaauthorOct 14.2004 — well i already tried white space and that dont work..pre wont work either...i need in auto
Copy linkTweet thisAlerts:
@Paul_JrOct 14.2004 — [font=palatino linotype]If there is no whitespace in the text then it will run on forever and ever and not break.[/font]
Copy linkTweet thisAlerts:
@JonaOct 14.2004 — [font=trebuchet ms]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>.[/font]
Copy linkTweet thisAlerts:
@ilyaauthorOct 14.2004 — 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....
Copy linkTweet thisAlerts:
@JonaOct 14.2004 — [font=trebuchet ms]That's because the text isn't [b]supposed[/b] 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.[/font]
Copy linkTweet thisAlerts:
@ilyaauthorOct 14.2004 — thx neway ill just make tables with css properties k..
Copy linkTweet thisAlerts:
@JonaOct 15.2004 — [i]Originally posted by ilya [/i]

[B]thx neway ill just make tables with css properties k.. [/B][/QUOTE]


[font=trebuchet ms]Don't use tables; you'll end up having to redesign with CSS sooner or later.[/font]
Copy linkTweet thisAlerts:
@ilyaauthorOct 15.2004 — 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..
Copy linkTweet thisAlerts:
@JonaOct 15.2004 — [font=trebuchet ms]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 [url=http://www.roderickhoward.com/cssdirectory/]CSS directory[/url] 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. ? [/font]
Copy linkTweet thisAlerts:
@Stephen_PhilbinOct 15.2004 — "function MM_" <------- Mark of the devil.

Can that damned thing make anything that works on a browser?
Copy linkTweet thisAlerts:
@ilyaauthorOct 15.2004 — iduno lol....
Copy linkTweet thisAlerts:
@JonaOct 15.2004 — [i]Originally posted by Mr Herer [/i]

[B]"function MM_" <------- Mark of the devil.



Can that damned thing make anything that works on a browser? [/B]
[/QUOTE]


[font=trebuchet ms]Those are usually, if not always, generated by DreamWeaver, if I'm not mistaken.[/font]
Copy linkTweet thisAlerts:
@ilyaauthorOct 16.2004 — they are...but what do they do?!? browser compatibility?!?
Copy linkTweet thisAlerts:
@JonaOct 16.2004 — [font=trebuchet ms]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.[/font]
×

Success!

Help @ilya spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...