0

I have a really long link that I need to display on an .aspx page. I word wrapped it because it was escaping the parent container. I used css similar to this: Word wrap a link so it doesn't overflow its parent div width. It works fine, but now the link isn't clickable(blue) anymore. Is there a quick and clean way to have the link maintain its link?

I figure I can just put an a href='the same reallyreallylong ?querystringurl' around it, but it seems messy.

EDIT: Now I'm starting to think I was hallucinating and the page never displayed the link as a clickable url. I'm going to put the 'a' tag around it. Code edit:

<li>Example:<p class="wordwrap">http://www.blah.com/yup.asmx?quuuuuuuuuuueeery</p></li>

CSS:

.wordwrap
{
white-space: pre-wrap; /* css-3 */    
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */    
white-space: -o-pre-wrap; /* Opera 7 */    
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
Community
  • 1
  • 1
BearSkyview
  • 385
  • 1
  • 8
  • 24

2 Answers2

1

if you want to display the url as a link then an anchor tag is the way to go.

<a href="url">url</a>
Jason Meckley
  • 7,589
  • 1
  • 24
  • 45
0

if you wanted to get a little more complicated you could always call a url shortner api like tinyUrl and display the shortened url instead.

ex. http://tinyurl.com/api-create.php?url=http://thisismyreallylongurl.com

tdean
  • 508
  • 1
  • 7
  • 15