Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-28-2007, 05:52 PM   PM User | #1
esthera
Senior Coder

 
Join Date: May 2004
Posts: 1,432
Thanks: 14
Thanked 0 Times in 0 Posts
esthera can only hope to improve
long link on 2 lines looks like a br in the middle

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?
esthera is offline   Reply With Quote
Old 06-28-2007, 05:58 PM   PM User | #2
kosstr12
Regular Coder

 
kosstr12's Avatar
 
Join Date: Apr 2007
Location: Woodstock, Georgia
Posts: 428
Thanks: 7
Thanked 5 Times in 5 Posts
kosstr12 is on a distinguished road
Widen the div?



EDIT: Yayy #200
kosstr12 is offline   Reply With Quote
Old 06-28-2007, 06:02 PM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,705
Thanks: 5
Thanked 876 Times in 851 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
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:
Code:
<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.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 06-28-2007, 06:08 PM   PM User | #4
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
It can be even better
Code:
<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>
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 06-28-2007, 06:17 PM   PM User | #5
esthera
Senior Coder

 
Join Date: May 2004
Posts: 1,432
Thanks: 14
Thanked 0 Times in 0 Posts
esthera can only hope to improve
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.
esthera is offline   Reply With Quote
Old 06-28-2007, 06:26 PM   PM User | #6
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 06-28-2007, 06:50 PM   PM User | #7
esthera
Senior Coder

 
Join Date: May 2004
Posts: 1,432
Thanks: 14
Thanked 0 Times in 0 Posts
esthera can only hope to improve
.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
esthera is offline   Reply With Quote
Old 06-28-2007, 07:17 PM   PM User | #8
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Seems like there may be something else causing the issue. Can you post a link to your page?
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 +1. The time now is 11:17 AM.


Advertisement
Log in to turn off these ads.