Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
IE7 puts each word on new line
Old 06-21-2011, 08:24 AM IE7 puts each word on new line
TWD
TWD's Avatar
King Spam Talker

Posts: 1,190
Trades: 0
Thought I would post this up for sake of posterity.

Had a a weird IE7 bug where each word in a div was wrapping
to a new line.

The solution: declare a width for the Div
e.g. width: 500px;

Solved.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-21-2011, 10:27 AM Re: IE7 puts each word on new line
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,391
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
What is the code that causes the problem?

purely in the interests of science of course.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-21-2011, 07:24 PM Re: IE7 puts each word on new line
TWD
TWD's Avatar
King Spam Talker

Posts: 1,190
Trades: 0
Code:
<table class="views-view-grid">
<tbody>
<tr class="row-1 row-first">
<td class="col-1">

<span class="views-field-model">foo</span>

<span class="views-field-body">foo</span>

<span class="views-field-title">bar</span>

<div class="views-field-desc-value">

           <div class="field-content">Lorem  ipsum dolor sit amet, taciti dolor   ut nisi vitae, quis sit quisque  morbi aliquam suspendisse proin, integer sed arcu in amet.</div>



</div>



</td>
</tr>
</tbody>
</table>
It's a Drupal generated Views Table, with all elements within the container cell floated left. On IE7 it wraps every word to a new line unless you give the bolded Div an explicit width.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE

Last edited by TWD; 06-21-2011 at 07:26 PM..
TWD is offline
Reply With Quote
View Public Profile
 
Old 06-21-2011, 07:31 PM Re: IE7 puts each word on new line
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,391
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I think I would have tried removing those unclosed spans before setting a fixed width.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-21-2011, 07:42 PM Re: IE7 puts each word on new line
TWD
TWD's Avatar
King Spam Talker

Posts: 1,190
Trades: 0
Sorry Chris, don't follow you.
The Spans are closed off.

Maybe you posted after I updated the code block.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is offline
Reply With Quote
View Public Profile
 
Old 06-22-2011, 08:06 PM Re: IE7 puts each word on new line
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,391
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Possibly.

Mind you without any CSS it's impossible to recreate.

But as it is a div in a table cell (never a good combination) and without any explicit widths set on the table the cell would simply collapse to the longest word length in the column and as a block element such as a div is always as wide as the parent is ....
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 06-22-2011 at 08:07 PM..
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to IE7 puts each word on new line
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22417 seconds with 12 queries