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 6645459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:17:25+00:00 2026-05-26T00:17:25+00:00

Below i have hardcoded dotted lines on my menu between the name and image,

  • 0

Below i have hardcoded dotted lines on my menu between the name and image, I cant figure out how to get dotted lines that adjust to the width between where i have them now.

This is the code below that i have. I basically want to remove the hardcoded ….. and make it better somehow with a repeated image inside or just something easier, how can i approach this? I have been boggled with this problem for some time now…

  <script type="text/javascript">
  $(document).ready(function(){

  $('.serviceDesc').hide();
  $('.serviceName:first').addClass('active').next().show(); 

  $('.serviceName').click(function(){
  if( $(this).next().is(':hidden') ) { 
  $('.serviceName').removeClass('active').next().slideUp(); 
  $(this).toggleClass('active').next().slideDown(); 
  }
  return false; 
  });

  });
  </script>
  <style>
  #servicesContainer {
      width: 485px;
      height: 400px;
      margin: 0 auto;
      margin-top: 20px;
  }
  h2.serviceName {
      margin: 0;
      margin-bottom: 5px;
      margin-top: 5px;
      background-image: url(http://i.imgur.com/IcnZl.png);
      background-position: right top;
      background-repeat:no-repeat;
      height: 29px;
      line-height: 24px;
      width: 480px;
      font-size: 18px;
      font-weight: bold;
      float: left;
      color:#000;
  }
  h2.serviceName a {
      color: #000;
      text-decoration: none;
      display: block;
  }
  h2.active {
      background-position: right bottom;
  }
  .serviceDesc {
      margin: 0 0 10px;
      padding: 0;
      overflow: hidden;
      width: 480px;
      clear: both;
  }
  .serviceDesc .block {
  }
  .serviceDesc .block p {
      color: #413f44;
      margin: 0;
      font-size:18px;
  }
  </style>

  <div id="servicesContainer">
    <h2 class="serviceName"><a href="#">Text...............................................................................</a></h2>
    <div class="serviceDesc">
      <div class="block">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud. </p>
      </div>
    </div>
    <h2 class="serviceName"><a href="#">Text...............................................................................</a></h2>
    <div class="serviceDesc">
      <div class="block">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.</p>
      </div>
    </div>
    <h2 class="serviceName"><a href="#">Text...............................................................................</a></h2>
    <div class="serviceDesc">
      <div class="block">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.<br />
          <br />
        </p>
      </div>
    </div>
    <h2 class="serviceName"><a href="#">Text...............................................................................</a></h2>
    <div class="serviceDesc">
      <div class="block">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.</p>
      </div>
    </div>
    <h2 class="serviceName"><a href="#">Text...............................................................................</a></h2>
    <div class="serviceDesc">
      <div class="block">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud. </p>
      </div>
    </div>
    <h2 class="serviceName"><a href="#">Text...............................................................................<br />
      </a></h2>
    <div class="serviceDesc">
      <div class="block">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud. </p>
      </div>
    </div>
    <h2 class="serviceName"><a href="#">Text...............................................................................</a></h2>
    <div class="serviceDesc">
      <div class="block">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.</p>
      </div>
    </div>
    <h2 class="serviceName"><a href="#">Text...............................................................................</a></h2>
    <div class="serviceDesc">
      <div class="block">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.</p>
      </div>
    </div>
  </div>

You can view an example here:
http://jsfiddle.net/K7MHK/

  • 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-26T00:17:25+00:00Added an answer on May 26, 2026 at 12:17 am

    creating a with a repeated by x background image of a dot would be the easiest way.
    However you would need to set the element it is in to width:100% or whichever width you want it at.

    eg.

    <html>
      <head>
        <style>
          .filler{
            background: url(dot.png) bottom left repeat-x;
            float:left;
            width:80%;
          }
          .floating_text {
            float:left;  
          }
        </style>
      </head>
      <body>
        <h2 class="serviceName"><a href="#">
          <span class="floating_text">Text</span>
          <span class="filler">&nbsp;</span>
        </a></h2>
      </body>
    </html>
    

    The span appears to hook into the <h2></h2> height and not the <a></a> height, this is what is causing the problem with it appearing on two lines.

    The reason the dots appear to be in the middle of the span in your example is because of your image, remove the white at the bottom and it will appear as normal.

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

Sidebar

Related Questions

Solution to original problem (below) may have been discovered. I commented out <identity> ...
I am trying to learn more about regular expressions I have one below that
As can be seen below I have 1st image an original JPEG image .Second
Below I have a very simple example of what I'm trying to do. I
I have below a list of text, it is from a popular online game
In the example below I have a ListBox with dozens of font names in
Edit: I have solved this by myself. See my answer below I have set
SQL Server (2005/2008) Each of the below statements have the same result. Does anyone
I have the below query, which basically it retrieves the 5 top most books
I have the below code in stdafx.h. using namespace std; typedef struct { DWORD

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.