473,405 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

fixed table in a DIV

2
I have a table inside a div. the table extends beyond the right edge of the screen because of long text. Is it possible to wrap the cells(td) to fit in the specified div width?

td{
white-space:nowrap;
}

<div>
<table border="1" style='border:1px dotted black'>
<tr>
<td>cell-cell cell cell cell</td>
<td>cell-cell cell cell cell</td>
<td>cell-cell cell cell cell</td>
<td>cell-cell cell cell cell</td>
<td>cell-cell cell cell cell</td>
<td>cell-cell cell cell cell</td>
<td>cell-cell cell cell cell</td>
<td>cell-cell cell cell cell</td>
</tr>
</table>
</div>

TIA
Nagendra Oleti
Sep 24 '07 #1
3 1845
drhowarddrfine
7,435 Expert 4TB
It's the white-space property that's causing the problem. Do you need that?
Sep 24 '07 #2
Death Slaught
1,137 1GB
I thought that the browser wraps the text by default, so doesn't that meen that the "nowrap" is generating the problem?


Thanks, Death
Sep 24 '07 #3
ovsnk
2
Yes I need the white-space:nowrap, so that the text doesn't get wrapped with in each cell. At the same time I want the table itself confine to within the div block set to 100%. Is it possible to have the cells wrap to the next line?
Sep 27 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
25
by: Michael Schuerig | last post by:
I'm trying to do something seemingly very simple, but it's brought me close to crushing my head on the keyboard. All I want is a table where the head row is fixed and the body columns below are...
4
by: Rob Freundlich | last post by:
I have some servlet-generated tabular data that I need to present, so I'm using an HTML Table. In some cases, it can be quite large. I'm flushing the servlet output every N lines to push the data...
2
by: dfdavis.mtu | last post by:
I have a table that I dynamically fill with data from a database for medical companies to be able to determine if their patients meet certain criteria. However they want a fixed header for it so...
3
by: jerrygadd | last post by:
Hi can anyone please help? I have a need to make a table of fixed size, containing three rows, where the middle row auto expands to fill the remaining space between the top and bottom rows. ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.