Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Div tag adjust its width to the longest word in it

Div tag width

1:26 am on Dec 12, 2007 (gmt 0)

New User

10+ Year Member

joined:Dec 12, 2007
posts: 4
votes: 0


I have posted this on the CSS forum too, but I am not sure if it is a Dreamweaver problem...

I am new to CSS, so please be patient.

Not a great problem, but annoying:
I am using Dreamweaver CS3 and CSS to build my site.
There is a div tag to contain simple text. Everything is default, only margin and padding setting are not 0
I use it in 2 occasion.
On the first, it is normal.
On the same page next time it behaves as it was made of elastic.
It adjusts its width to the longest word in it.

In Firefox and in IE6 the result looks completley normal, only Dreamweaver displays it like this.

Anyone knows about these problem?



2:07 pm on Dec 12, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 19, 2004
votes: 0

Hello Attila,

There are a number of reasons why the design view of DW will render much differently than a browser. Dynamic scripts, server-side includes, etc. will all cause pages to render differently.

Available screen width can also cause pages to collapse a bit in DW's design view. <div>s will not break a word to wrap - that's probably why you're seeing the <div> wrap to the longest word that it contains.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members