Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts

    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?

  • #2
    Regular Coder kosstr12's Avatar
    Join Date
    Apr 2007
    Location
    Woodstock, Georgia
    Posts
    428
    Thanks
    7
    Thanked 5 Times in 5 Posts
    Widen the div?



    EDIT: Yayy #200

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,793
    Thanks
    6
    Thanked 1,022 Times in 995 Posts
    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.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||

  • #5
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||

  • #7
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts
    .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

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •