...

View Full Version : long link on 2 lines looks like a br in the middle



esthera
06-28-2007, 05:52 PM
I have the following html in a div of only 50 px

<div>
<a href="javascript:loadpopunder('showanevent.asp?date=6/29/2007');" class="style5">this is a long test and even longer</a>
</div>


now when it goes to the next line it looks like

this is a long

test and even

with a double line break - there is no <br>

any ideas?

kosstr12
06-28-2007, 05:58 PM
Widen the div?



EDIT: Yayy #200

VIPStephan
06-28-2007, 06:02 PM
What styles are applied to that link (".style5")? Could be a large line height?

And also please do not ever use href="javascript: Ö" again. This is forbidden! A proper link with event handler looks like this:


<a href="showanevent.asp?date=6/29/2007" onclick="loadpopunder('showanevent.asp?date=6/29/2007'); return false;" class="style5">this is a long test and even longer</a>


This ensures that people with JS disabled will still get a result (i.e. be able to get to the link target), plus there is no protocol called javascript:. I donít know who invented this but itís just useless and wrong and everybody will confirm that.

_Aerospace_Eng_
06-28-2007, 06:08 PM
It can be even better

<a href="showanevent.asp?date=6/29/2007" onclick="loadpopunder(this.href); return false;" class="style5">this is a long test and even longer</a>

esthera
06-28-2007, 06:17 PM
thanks... changed that and it still didn't work. -
any ideas what could be causing the line break.
I need it to be small - it's in a small box.

_Aerospace_Eng_
06-28-2007, 06:26 PM
We still need to see your styles as asked for already. Help us help you. We aren't psychic. I agree with Stephan that its likely a larger line-height.

esthera
06-28-2007, 06:50 PM
.style5 {
font-size: 10px;
line-height:11px;
font-family:Arial, Helvetica, sans-serif;
color:#00CC00;
}


I only added the line height to try to fix the issue but it doesn't
there's no other line height set in this css

_Aerospace_Eng_
06-28-2007, 07:17 PM
Seems like there may be something else causing the issue. Can you post a link to your page?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum