Search
  • Got a URL thats too long?

    Date: Jun 23, 2010  |  Categories: Css  |  Written By: Mike Ballan  

Ok so ive had this problem a few times now, where ive had to include a url of a site but its too long to fit in the area it sits in and the only way ive been able to make it fit is by adding a <br /> to the url.

But there is another way that this can be done, all you need to do is create a style in your Css like below.

.break-word {
    word-wrap: break-word;
}

Next all you will have to do is wrap a span around your long url.

<span class="break-word">http://www.wtfdwk.com_title_with_a_long_url_continue_here</span>


Leave a Reply

Back to Top