WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > HTML & XHTML > [SOLVED] Can hypertext links be split along their length?

Reply
  Thread Tools Display Modes
Old 18th May 15, 10:59 AM   #1
desk
WLC Member
 
desk's Avatar
 
Join Date: May 2015
Location: Melbourne, Australia
Posts: 22
Default Can hypertext links be split along their length?

A problem occurs in my bibliography - a list of references, many with long URLs printed out in full. The lift is aligned left & occasionally there are illustrations floated right.
When the browser window is narrowed to about half the width of the screen (as I'm thinking of what the page might look like on a tablet), the pic bumps up against the hyperlinks.

Then, a long link will jump down below the picture, leaving a large gap above it. This interrupts the flow of text in the left list. It occurs when there are only letters & full-stops in the hypertext, & no nearby hyphens or forward slashes. (E.g. the link http://vantagepointmagazine.wordpress.com/ causes such a jump.)

Is there a way to make the text more flexible, rather than non-breaking?

I realize setting a minimum width for the list might help, but I'm not sure how fixed dimensions could relate to such a line of letters (nor how this might effect mobile devices).
__________________
/*<--Desk-->*/
desk is offline   Reply With Quote
Old 18th May 15, 07:34 PM   #2
meesa
WLC Mod
 
meesa's Avatar
 
Join Date: Jul 2009
Location: Milky Way Galaxy
Posts: 3,710
Default Re: Can hypertext links be split along their length?

I think this is what you're looking for:

http://www.w3schools.com/cssref/css3_pr_word-break.asp

However, a better option would be to not use raw URLs, but rather URLs which are hidden behind text descriptions and thus can break at the word endings.
__________________
Praise be to the Lord God for the ability to learn, the capability to analyze, and the time to help users on this forum.
meesa is offline   Reply With Quote
Old 19th May 15, 11:04 AM   #3
desk
WLC Member
 
desk's Avatar
 
Join Date: May 2015
Location: Melbourne, Australia
Posts: 22
Default Re: Can hypertext links be split along their length?

That link seems just the ticket! I'll tinker with 'break-all' & the rest, & see what happens. Also, it's good to find this cache of WC3 treasures - I had no idea.

Hidden links have possibilities, too - cleaner & shorter bibliographies are the main advantages.
On the other hand, full links often tell users if they are are clicking on pdf, doc, html or whatever. I've always found that handy. (Maybe I could include a note, with type of file & size, the next time I check all the links to make sure they still work.)
__________________
/*<--Desk-->*/
desk is offline   Reply With Quote
Old 19th May 15, 12:39 PM   #4
meesa
WLC Mod
 
meesa's Avatar
 
Join Date: Jul 2009
Location: Milky Way Galaxy
Posts: 3,710
Default Re: Can hypertext links be split along their length?

Depending on the link, there are a few ways to tell them the file type. The easiest is simply:

PDF: Your PDF title here.

Another option is to make use of the :before pseudo, and put an icon corresponding to the type of file it links to, based on a class or something.
__________________
Praise be to the Lord God for the ability to learn, the capability to analyze, and the time to help users on this forum.
meesa is offline   Reply With Quote
Old 19th May 15, 08:08 PM   #5
desk
WLC Member
 
desk's Avatar
 
Join Date: May 2015
Location: Melbourne, Australia
Posts: 22
Default Re: Can hypertext links be split along their length?

Another possibility - maybe links, if hidden, won't show as errors in validaton. They do now, when visible (as does a Google search form from last century).
Just being picky...
__________________
/*<--Desk-->*/
desk is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:10 PM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyrightę 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.