Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6622141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:22:06+00:00 2026-05-25T21:22:06+00:00

I had a jquery/css question. I was wondering if you knew how to make

  • 0

I had a jquery/css question.

I was wondering if you knew how to make a link in a list item (one that is longer that its container) not wrap to a new line and instead stay on 1 single line and fade/cut off the overflowing rest of the link. Also, the link would “ticker” (right to left) across to show the remainder of the text when the user rolled over it (on hover).

Also, the text doesn’t have to be necessarily “faded out” but could just be cut off a few pixels from the edge of the container.

.list_wrapper li {
display: block;
height: 23px;
margin: 0px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.list_wrapper li:last-child {
margin-bottom: 5px;
}

.list_wrapper li:nth-child(odd) {
background:#FAFAFA;
border-top: 1px solid #FAFAFA;
border-bottom: 1px solid #FAFAFA;
}

.list_wrapper li:nth-child(even) {
background:#FFFFFF;
border-top: 1px solid #FFF;
border-bottom: 1px solid #FFF;
}

.list_wrapper li:hover {
cursor: default;
background: #F3F3F3;
border-top: 1px solid #E9E9E9;
border-bottom: 1px solid #E9E9E9;
}

.list_wrapper a {
color: #145F92;
font: 400 11px/23px "Lucida Grande", tahoma, verdana, arial, sans-serif;
margin-left: 13px;
-webkit-transition: color .3s ease;
-moz-transition: color .3s ease;
-ms-transition: color .3s ease;
transition: color .3s ease;
 }

.list_wrapper a:hover { text-decoration: underline; }

.article_list {
float:left;
display: block;
width:100%;
}

Have any ideas how I could achieve this?

Wanted look:

http://i1132.photobucket.com/albums/m563/carrako/link_face.jpg

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:22:07+00:00Added an answer on May 25, 2026 at 9:22 pm

    To “cut off” the text, use the following CSS:

    .list_wrapper li {
        overflow: hidden;
    }
    
    .list_wrapper li a {
        white-space: nowrap;
        position: relative; // Needed for the animation!
    }
    

    Then, for the “ticker”-animation, use an animation-framework, e.g. jQuery, to “move” the <a> element (animate the CSS left-property) when it’s hovered; but only, if offsetWidth of the element exceeds the width of the parent node (otherwise we don’t need to scroll). On mouseout, we stop the animation and move the element back.

    Example, using jQuery:

    $('.list_wrapper li a').mouseover( function() {
        if( this.offsetWidth > this.parentNode.offsetWidth ) {
            $(this).animate({'left': '-'+(this.offsetWidth)+'px'}, 5000, function(){this.style.left='0px';});
        }
    } ).mouseout( function() {
        $(this).stop();
        this.style.left = '0px';
    } );
    

    For this JavaScript-Snippet to work, you would need to embed the jQuery-framework to your website. The snippet should be executed when the page finished loading: either you put it at the very end of your HTML (just before the </body>), or you trigger it window.onload.

    For a running example, see here:
    http://jsfiddle.net/z7V7d/2/

    Edit: Actually, I don’t like doing the homework for others; but I had fun doing it so I guess it’s okay. I updated the code to your wishes. 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had posted one question earlier jQuery inconsistency in setting readonly attribute in IE-8
In Theory I have a div (container) that when hovered over one of its
I had that question in mind for a long time. Theoretically, jQuery core function
I just saw a demo that had this jquery code to show and hide
I understand that this is a probably a noob-ish question, but I've had no
I'm learning jQuery and had a question about a method call on an HTML
I'm trying to convert my jquery css to an external css file but had
i had asked a question about refering objects in a function that is inside
I just had the jQuery epiphany the other day and still feel like there
Has anyone had the same experiences with jQuery AJAX and the beforeSend property? Any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.