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

  • Home
  • SEARCH
  • 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 6614335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:19:36+00:00 2026-05-25T20:19:36+00:00

I have been trying to get some dotted lines all over my site. I’m

  • 0

I have been trying to get some dotted lines all over my site.
I’m starting to understand the idea but I ran into another problem…
I am making another dotted line, this time between text and an image. This one’s a bit different.

I am also getting problems where sometimes the image goes under the lines due to the width changes: when I update my site, etc.

How can I make it here so that I can have the dotted lines’ width change to the total width of the h2?
I want the dotted lines not to bother anything and just go smooth through it.

This is the code I’m using, and I need to keep it in the basic principle:

      <script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
      <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>

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-25T20:19:37+00:00Added an answer on May 25, 2026 at 8:19 pm

    As with the phone/email question, it’s the same idea. You can use a background image on the element to create the dotted lines. Since you’ve already got a background on the <h2>, add it to the <a>:

    h2.serviceName a {
        background: url(dots.gif) repeat-x bottom left;
        /* Other CSS styles */
    }
    

    Here’s an example. As a bonus, it means you can get rid of all your hard coded dots too.

    Update: If you want to block the dots from behind the words, add a <span> element with solid background color that wraps the text:

    HTML

    <h2>
        <a href="">
            <span>Juicy text</span>
        </a>
    </h2>
    

    CSS

    a span {
        background-color: #fff;
    }
    

    This will prevent the dotted background of the <a> from showing through.

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

Sidebar

Related Questions

I have been trying all day to get some data properly formatted in a
I have been trying to get my head around some errors I get when
I have been trying to get my Arduino/Eclipse environment setup. For some reason I
I've been trying to get the UNIQUE constraint placed on some attributes I have
I have been trying to get some jQuery running replacing the html of an
I have been trying to get some basic dynamic code compilation working using the
I have been trying to get our software department to adopt some kind development
I have been trying to get this query to work but I am stumbed
I've been trying to get an existing project working on local copy but have
I have been trying to export some datagrids in Silverlight to excel, but have

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.