Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Example of DIV wrapping problem

Reply
Thread Tools

Example of DIV wrapping problem

 
 
plenty900@yahoo.com
Guest
Posts: n/a
 
      03-01-2008
Hi folks,

I'd like to have all DIVs lined up in a row at the top, and none
wraps.
If necessary I would rather than the overall page width expand
rather than having DIVs wrap. But these are wrapping.

Can someone explain what I'm doing wrong?
Thanks.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled Page</title>
<style type="text/css">
div.short {float: left; width:50px; border: solid black 1px; margin:
2px;}
div.long {float: left; border: solid black 1px; margin: 2px;}
div.rt {float: right; width:120px; border: solid black 1px; margin:
2px;}
</style>
</head>
<body>
<div ><!-- container -->
<div class="short">
<span>inner span 1</span>
<br />
<span>inner span 2</span>
</div>
<div class="short">
<span>inner span 1</span>
<br />
<span>inner span 2</span>
</div>
<div class="short">
<font size=6>
$
</font>
</div>
<div
class=long>dflajlfadljfalfkjdaslkaasldkjflakjdfaad slkjsdlfkjadslkfjalkjf
lsdkfjlaksjflasdjflkasjdlfkjasdlkfjaslkjflsadjflka jslfkjasdlfkjlskdjflsadldskjlfjdsldkjlksdjflsdkjfl dskj</
div>
</div>
<div class=short>test test test</div>
</body>
</html>
 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      03-01-2008
In article
<(E-Mail Removed)
>,

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Can someone explain what I'm doing wrong?


Did I mention before:
<http://www.htmldog.com/guides/htmlbeginner/> ?

--
dorayme
 
Reply With Quote
 
 
 
 
Neredbojias
Guest
Posts: n/a
 
      03-01-2008
On 29 Feb 2008, wrote:

> Hi folks,
>
> I'd like to have all DIVs lined up in a row at the top, and none
> wraps.
> If necessary I would rather than the overall page width expand
> rather than having DIVs wrap. But these are wrapping.


Try this:

http://www.neredbojias.com/nowrap.html

(Do a view-source.)

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      03-01-2008
Scripsit (E-Mail Removed):

> I'd like to have all DIVs lined up in a row at the top, and none
> wraps.


Huh?

> If necessary I would rather than the overall page width expand
> rather than having DIVs wrap. But these are wrapping.


Parse your statements do not. Understandable meaning they lack.

> Can someone explain what I'm doing wrong?


You started a new thread without a reason, you replied cluelessly (no
quotation) - though probably to clueless answers, since they appear to
be from killfiled posters - and you _still_ don't give a URL or even a
_real_ example. Is this sufficient or do you want a longer lecture?

> <div
> class=long>dflajlfadljfalfkjdaslkaasldkjflakjdfaad slkjsdlfkjadslkfjalkjf
>


Just remove that nonsense, and all the rest that does not make sense.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
plenty900@yahoo.com
Guest
Posts: n/a
 
      03-01-2008

> http://www.neredbojias.com/nowrap.html


Thanks, that almost fixes things. But now, how do I
restrict the width of the outer DIV, to force the inner
DIVs to wrap that text?
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      03-02-2008
On 01 Mar 2008, wrote:

>
>> http://www.neredbojias.com/nowrap.html

>
> Thanks, that almost fixes things. But now, how do I
> restrict the width of the outer DIV, to force the inner
> DIVs to wrap that text?


Oh. Well how about this?

http://www.neredbojias.com/nowraptu.html

Basically simulates a table.

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
DIV wrapping problem Matt White HTML 15 03-06-2009 10:05 PM
C Function Pointer Wrapping Example not working Charlie Python 3 11-18-2008 07:59 PM
NS/FF don't change div offsetWidth when div innerHTML is added toand div becomes wider mscir Javascript 3 06-26-2005 04:04 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM



Advertisments