开发者

short td content to match td wide? [closed]

开发者 https://www.devze.com 2023-04-05 02:22 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

i have problem in my table rows!

My html code

<table border=1 width=100%>
<tr>
<td>
My post subject
</td>
<td>
My post small content/description goes here , 
test small description , test small description , test small description
</td>
<td>
post auther
</td>
<td>
post date
</td>
</table>

if you minimize the screen

the td height will became doubly!

So i want make table height not affectable!

i think this is impossible!

So i have found trick in google gmail

they use this trick

they only show some of the td content!

for example:

my real td content is

My post small content/description goes here , 
test small description ,开发者_C百科 test small description , test small description

if you minimized the screen

it will became shorted to

My post small content/description goes here , 
test small description 

to match the td width!

i have taked one picture from google gmail before and after minimiz

and i have also taked one picture for my page before and after minimiz!

The google explation image:

short td content to match td wide? [closed]

My page image:

short td content to match td wide? [closed]

i think they done it by javescript!

because page contain no css codes!

--edit -- reply for joe

i tried your code and found new problem

short td content to match td wide? [closed]

please see pictures again and see my problem!

thank you


You can probably fake it with

<td style="white-space: nowrap; overflow: hidden;">
    My post small content/description goes here , 
    test small description , test small description , test small description
</td>

Obviously you can define that as a CSS class or rule in a separate stylesheet, if you so wish. I've shown it inline for simplicity :)

0

精彩评论

暂无评论...
验证码 换一张
取 消