473,569 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

css wrap v attribute wrap

(reposting due to unrelated noise in original post)

Hi
In the example below on a normal size screen everything looks the
way you would think it would (on IE6). My problem is what happens when I
add more entries into the table (equivilent here to making the IE window
smaller)

- If you make the window smaller then the first column text starts to
wrap, which I don't want
- If you remove the width part, which gets ignored anyway, then the
text
no longer wraps and a scrollbar appears, which is what I want.
- just adding the attribute nwrap doe what I want, but I would rather have
a css solution

The problem is that I do want to set the width of the first column,
but
I want the rest of the table to be as small and fitted as possible

Any ideas?

Ta
F

<style>
..Bob
{
white-space: nowrap;
width: 500px;
}
..Sue
{
white-space: nowrap;
}
</style>
<table>
<tr>
<td class=Bob>Some random text </td>
<td class=Sue>Some random text </td>
<td class=Sue>Some random text </td>
</tr>
</table>
<hr>
<table>
<tr>
<td class=Bob nowrap>Some random text </td>
<td class=Sue>Some random text </td>
<td class=Sue>Some random text </td>
</tr>
</table>
Jul 20 '05 #1
2 15513
fo******@yahoo. co.uk wrote:
(reposting due to unrelated noise in original post)
Hmmm.
In the example below on a normal size screen everything looks the
way you would think it would (on IE6). My problem is what happens
when I add more entries into the table (equivilent here to making the
IE window smaller)


Why don't you post a URL or two so that we can look at the problem as you
see it, instead of gazillions of people doing the same thing, namely
trying to reconstruct your problem and misunderstandin g what you really
mean?

And why do you set width in pixels? How does that work for, say, a font
size of 42px?

My guess is that your problem relates to the feature that widths for
table columns are determined in a fairly complex manner, potentially
overriding the widths you set, at least when you don't set
table-layout: fixed, which is an interesting way of opening
several cans of worms at the same time.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2
Jukka K. Korpela <jk******@cs.tu t.fi> wrote:
My guess is that your problem relates to the feature that widths for
table columns are determined in a fairly complex manner, potentially
overriding the widths you set, at least when you don't set


Unfortunately almost all "big" browsers are just doing the wrong thing
when you use "nowrap" in table cells, also they are doing often the
wrong thing with the width of table cells.

Most browsers will ignore the "nowrap" attribute if a width is specified
for the cell as well. This is wrong, because the specified width must be
treated as minimum width (see the section about table formatting in the
CSS specification). So it is OK if the the final width of a cell is
larger then the specified one. So it can make sense to use "nowrap" and
"width" at the same time.

Also browsers are reducing the specified width (which is the minimum
width) of a cell if the specified width of the table itself is "too
small". But this is also wrong, because the resulting width of the table
itself must be the maximum of the specified width of the table and the
sum of the cell widths.

Maybe the browser developers try to mimic the behavior of the old
browser releases to avoid conflicts with web sites. But in my opinion
this would be only OK for the "Quirks" mode, but they're doing this also
in "standards compliant" mode, which is a very bad idea IMHO.
--
Alexander
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
21099
by: Toronto Web Designer | last post by:
<textarea name="application" cols="50" rows="12" wrap="virtual" class="textarea"></textarea> Apparently "wrap" is deprecated or not allowed for html 4.01, any suggestions on what I should use instead?
5
28072
by: Toronto Web Designer | last post by:
<textarea name="application" cols="50" rows="12" wrap="virtual" class="textarea"></textarea> Is there a way to include the wrap in CSS or is that a structure thing?
8
52993
by: Mark D. Smith | last post by:
Hi I have googled but not found a solution to wordwrap in a textarea using firefox/netscape. is there a style sheet solution or am i stuck with not being able to force wrapping in a textarea Mark
4
8495
by: Gérard Talbot | last post by:
Hello fellow stylers, What would be the best CSS equivalent of MSIE's wrap="off" and wrap="hard"? hard Text is displayed with wordwrapping and submitted with soft returns and line feeds. off Wordwrapping is disabled. The lines appear exactly as the user types them.
3
14567
by: Jason | last post by:
Anyone know how to make the text wrap in a text box of a DetailsView?
2
19262
by: mattrapoport | last post by:
Hello, I am have a div and inside of that div I have a textarea. There is nothing else in the div. The text in the textarea will come from a database so it needs to be able to wrap and grow as necessary. I've tried a whole bunch of permutations and I'm not having any luck. Any help would be greatly appreciated. Here's the code: HTML: ...
10
72665
by: Lorenzo Thurman | last post by:
I have a table cell that I want to wrap text inside of. I've tried both hard and soft wrap, but Firefox refuses to obey. IE 6&7 handle the wrap just fine. Does anyone know how I can fix this?
6
3733
by: Victor | last post by:
Hi all i have a css question about how to wrap a long text by using css. for example I have a very long text like "ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" there is not white space and line break inside the text. how can I wrap this text and make sure it can be used for most of the browser(IE, FF, sarafi)....
1
2777
by: Deepupriya | last post by:
hi can anyone tell me how to use wrap attribute for a table data.. or can i use any style attribute to wrp the table date
0
7605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.