User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 392,050 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,333 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 732 | Replies: 5 | Solved
Reply
Join Date: Oct 2007
Posts: 168
Reputation: Venom Rush is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
Venom Rush's Avatar
Venom Rush Venom Rush is offline Offline
Junior Poster

Making a long link inside a div break onto a new line

  #1  
Jun 12th, 2008
Hi there

I have a really long web link that I want to break onto a new line because it's longer than the width of the div. At the moment it makes an incredible amount of empty space above it until the div is below the div next to it.

Anyone know of any solutions to this?

P.S. It breaks fine in IE but when I view the page in Firefox it's a mess.
This user has a spatula. We don't know why, but we are afraid.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Location: Hyderabad, India
Posts: 245
Reputation: sreein1986 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 27
sreein1986's Avatar
sreein1986 sreein1986 is offline Offline
Posting Whiz in Training

Re: Making a long link inside a div break onto a new line

  #2  
Jun 13th, 2008
first when you insert div tag check that div tag properties and define width and height size then check in IE
Thanx,
Sreekanth

www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
Reply With Quote  
Join Date: Jan 2007
Posts: 2,510
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 105
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Making a long link inside a div break onto a new line

  #3  
Jun 14th, 2008
Display the title of the page instead of the link. Or do something like this:
<p><a href="this.is.the/really/long/url.htm">this.is.the/</a>
<br />really/long/url.htm</p>
Or even this:
<p><a href="this.string.is.the/really/long/url.htm">this.string.is.the/</a>
<br /><a href="this.is.the/really/long/url.htm">really/long/url.htm</a></p>
The last one makes both pieces of the link text active.
Last edited by MidiMagic : Jun 14th, 2008 at 7:51 pm.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: May 2008
Location: Hyderabad, India
Posts: 245
Reputation: sreein1986 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 27
sreein1986's Avatar
sreein1986 sreein1986 is offline Offline
Posting Whiz in Training

Re: Making a long link inside a div break onto a new line

  #4  
Jun 16th, 2008
[code]
<html>
</html>
[icode]
Thanx,
Sreekanth

www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
Reply With Quote  
Join Date: Oct 2007
Posts: 168
Reputation: Venom Rush is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
Venom Rush's Avatar
Venom Rush Venom Rush is offline Offline
Junior Poster

Re: Making a long link inside a div break onto a new line

  #5  
Jun 17th, 2008
Thanks for the response everyone, I ended up using php to replace long links in the way MidiMagic suggested.

P.S. It's for a small admin system. I'm not the one inputting the data
This user has a spatula. We don't know why, but we are afraid.
Reply With Quote  
Join Date: May 2008
Location: Hyderabad, India
Posts: 245
Reputation: sreein1986 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 27
sreein1986's Avatar
sreein1986 sreein1986 is offline Offline
Posting Whiz in Training

Re: Making a long link inside a div break onto a new line

  #6  
Jun 17th, 2008
pls put it mark as soved if solve the probelm
Thanx,
Sreekanth

www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 11:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC