Broken texts

Asked

Viewed 73 times

0

I have an imageButton that represents files, and a label on it:

<div class="block">
    <asp:HiddenField ID="idDirectorio" runat="server" Value='<%# Eval("guid") %>' />
    <asp:HiddenField ID="isFolder" runat="server" Value='<%# Eval("isFolder") %>' />

    <asp:ImageButton ID="btSend" runat="server" ImageUrl='<%# Eval("imgPath") %>' OnClick="btSend_Click" />

    <div class="bottom">
        <asp:CheckBox ID="check" runat="server" OnCheckedChanged="check_CheckedChanged" AutoPostBack="true" />
        <asp:Label ID="lblNome" runat="server" Text='<%# Eval("xInfo") %>' />
    </div>
</div>

CSS Current:

.block {
    display: inline-block;
    height: 80x;
    width: 80px;
    margin: 1px;
}

.block .bottom {
    font-size:small;
    height: 27px;
    left: 0px;
    right: 0px;  
    margin-bottom:10px;
}

.block .bottom input {
    height: 75%;
    width: 100%;
    padding-bottom:50px;
}

.block .bottom spam,
.block .bottom label {
    max-width: 80px;
    overflow: hidden;
}

Ugly result: inserir a descrição da imagem aqui

inserir a descrição da imagem aqui Summing up the names pass to each other, and do not break the line, and files that comes from windows with dash - , breaks too. How to fix it?

  • I’m not sure, it seems to me a problem with white-space.

1 answer

0


First corrects spam with "m" to span with "n". Add property word-wrap worthwhile break-word:

.block .bottom span,
.block .bottom label {
    max-width: 80px;
    overflow: hidden;
    word-wrap: break-word;
}

Documentation

Also add vertical-align to align the items:

.block {
    display: inline-block;
    height: 80x;
    width: 80px;
    margin: 1px;
    vertical-align: top;
}
  • Fixed the problems of the files that came with dash, but continues to pass to the other, not yet break down.

  • improved a lot, but files with big name, still this passing...

  • if you know what can be edited there.

  • Can you play this in a snippet? I thought word-wrap would solve

  • reproduce as?

  • Repeating this problem on http://jsfiddle.net for example will make it easier for someone else to solve it

  • is pq am using native components . net, is not pure html.I posted the image as still this.

  • http://jsfiddle.net/e3acv67r/

  • I found the error: you put "spam" with "m" instead of "n":D

  • Perfect, vlw... If a text is too big, to appear the 3 dots you have to use js?

  • You can use text-overflow

Show 6 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.