Solved

Wrapping email addresses (etc) with css

Posted on 2013-12-05
2
181 Views
Last Modified: 2013-12-20
Hello experts,

I have a div "table" that contains columns of text and email addresses.

It appears that when I have a long email address it will not wrap and will stick outside the "box".

I have seen discussions on the web on how to use css to get email addresses (and urls) to wrap.

I am looking for the best solution here, for all modern browsers (including IE8 if possible).

Thanks!

Rowby
0
Comment
Question by:Rowby Goren
2 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39699499
Normally a string will only wrap at white space, but you can indicate optional wrap points with the <wbr> tag:
https://developer.mozilla.org/en/docs/Web/HTML/Element/wbr
I'm not sure about the reliability of older IE browsers.

The other possibility is the CSS3 hyphens property; but that is not yet a finalized standard and not widely supported:

https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens

Generally for those kinds of things I will set overflow: hidden and put the string in the title attribute to display the whole thing as a tooltip.

Cd&
0
 
LVL 9

Author Closing Comment

by:Rowby Goren
ID: 39732821
Thanks!

Sorry for taking so long to award the points!

Rowby
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jQuery CSS Scroll Issue 3 70
Install bootstrap locally using Angular CLI 2 43
Angular JS Route 3 44
Remove lines by logo 2 20
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now