Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to split long email to fit in a column on the page

I'm displayng emails in a quite narrow column with some other data. In most cases emails fit into the column width but sometimes if an email is long it doesn'r fit and doesn't look nice. Is there a way (may be jquery method) or something like this to split email (to make it look like this):

this_is_a_long_email
@some_domain.net

I probably can write some javascript for it but don't want to invent a bicicle if it already exists (I tried to search but didn't find anything).

Thanks

like image 770
Burjua Avatar asked Sep 18 '25 06:09

Burjua


1 Answers

jsFiddle

HTML:

<span class="MailPart">this_is_a_long_email</span><span class="MailPart">@some_domain.net</span>

CSS:

.MailPart{
    display: inline-block;
}
like image 68
Supr Avatar answered Sep 19 '25 19:09

Supr