Using Bootstrap HTML, you can create a series of two dashed lines placed consecut

Is there a way to have two dashed lines one after the other, with minimal spacing or no space in between?

I attempted using two "tr" elements back to back, but it resulted in taking up a considerable amount of space.

Here is what I have tried:

Link to Code

<html>
<head>
 <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
 <link href="http://allfont.net/allfont.css?fonts=dot-matrix" rel="stylesheet" type="text/css" />

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
</head>

<h3 style="text-align:center">
AAAA DXXXXXXXX
</h3>
<P style="text-align:center">
YYYY, XXXX
</P>
<table style="width:100%">
<tr>
<td style="width: 50%;text-align: left;">
No. : 2
</td>
<td style="width: 50%;text-align: right;">
Dated : 3-Jul-2018
</td>
</tr>
</table>


  <table class="table">

    <thead>
    <br><br><br>
      <tr>
        <th class="noborder ">Particulars</th>
        <th class="noborder ">Debit</th>
        <th class="noborder ">Credit</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="noborder">
        Loan to Member  <span style="float:right">Dr</span><br>
        Empl name 1<span style="float:right">7,1023819</span><br>
        Empl name 2<span style="float:right">7,1023819</span><br>
        Empl name 3<span style="float:right"> 7,1023819</span><br>
        Empl name 4 <span style="float:right">7,1023819</span><br>
        <br>

        </td>
        <td class="noborder">7,1023819</td>
        <td class="noborder"></td>
      </tr>
      <tr>
        <td class="noborder">Interest on Member's Loan<br>
        <br><br><br><br><br><br><br><br>
        </td>
        <td class="noborder"></td>
        <td class="noborder">27020.00<br>
        <br><br><br><br><br><br><br><br></td>
      </tr>


      <tr>
        <td class="noborder">On Account of: <br>
        Being the amount of PF loan<br>
        interest charge against<br>
        Payment Voucher No:01,Date:03.07.18
        </td>
        <td class="noborder">27020.00</td>
        <td class="noborder"> 27020.00</td>
      </tr>
    <tr>
    </tr>
    </tbody>
  </table>


  <br><br><br><br><br>
  <br><br><br>
  <span style="float:right"> Authorised Signatory </span>

<style>
.noborder{
      border: none!important;
      border-right: dotted 1px black !important;
}

.up-border {
border-top: dotted 1px black;
}

 tr,td,thead,tbody {
        font-family: 'Dot Matrix', arial;
        text-shadow: 4px 4px 4px #aaa;
      }
</style>
</html>

My goal is to achieve something similar to this image:

https://i.sstatic.net/MoT8B.png

I am looking for a solution to add two dotted lines as shown in the picture with a red mark.

Any assistance would be greatly appreciated.

  • The code should not disrupt when printing to PDF.

Answer №1

To incorporate a styled div, use the following CSS:

.noborder{
      border: none!important;
  border-right: dotted 1px black !important;
}

.up-border {
border-top: dotted 1px black;
}

 tr,td,thead,tbody {
        font-family: 'Dot Matrix', arial;
        text-shadow: 4px 4px 4px #aaa;
      }
.twobord{
  border-top:1px dotted #e2e2e2;
  border-bottom:1px dotted #e2e2e2;
  height:5px;
  margin-top:55px;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
 <link href="http://allfont.net/allfont.css?fonts=dot-matrix" rel="stylesheet" type="text/css" />

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 


<h3 style="text-align:center">
AAAA DXXXXXXXX
</h3>
<P style="text-align:center">
YYYY, XXXX
</P>
<table style="width:100%">
<tr>
<td style="width: 50%;text-align: left;">
No. : 2
</td>
<td style="width: 50%;text-align: right;">
Dated : 3-Jul-2018
</td>
</tr>
</table>


  <table class="table">
  
    <thead>
<br><br><br>
      <tr>
    <th class="noborder ">Particulars</th>
        <th class="noborder ">Debit</th>
        <th class="noborder ">Credit</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="noborder">
    Loan to Member  <span style="float:right">Dr</span><br>
Empl name 1<span style="float:right">7,1023819</span><br>
Empl name 2<span style="float:right">7,1023819</span><br>
Empl name 3<span style="float:right"> 7,1023819</span><br>
Empl name 4 <span style="float:right">7,1023819</span><br>
<br>

</td>
        <td class="noborder">7,1023819</td>
        <td class="noborder"></td>
      </tr>
      <tr>
        <td class="noborder">Interest on Member's Loan<br>
<br><br><br><br><br><br><br><br>
</td>
        <td class="noborder"></td>
        <td class="noborder">27020.00<br>
<br><br><br><br><br><br><br><br></td>
      </tr>
  

      <tr>
        <td class="noborder">On Account of: <br>
Being the amount of PF loan<br>
interest charge against<br>
Payment Voucher No:01,Date:03.07.18
</td>
        <td class="noborder">27020.00 <div class="twobord"></div></td>
        <td class="noborder"> 27020.00 <div class="twobord"></div></td>
      </tr>
<tr>
</tr>
    </tbody>
  </table>
  
  
  <br><br><br><br><br>
  <br><br><br>
  <span style="float:right"> Authorised Signatory </span>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

ways to conceal the default icon in bootstrap navbar

I am looking to incorporate Bootstrap tags into my HTML file in order to display my menu items. However, I want to avoid having the default navbar highlight box and hamburger icon appear when users visit my site using a tablet or mobile device. <nav cl ...

Div automatically shifts to center position when other div elements vanish from view

I am new to jquery and currently working on a basic website. The site consists of three boxes, each of which, when clicked, causes the other two to fade out using the .fadeOut('slow'); method. However, there is an issue - all of the boxes are enc ...

Issue with Bootstrap 4 navbar dropdown on mobile: unable to click on menu item

My website is currently in development with Bootstrap 4. I'm facing an issue where, on mobile devices, when the menu items collapse into the three bars, they are not clickable. Despite following the recommendations in the Bootstrap documentation, the ...

Preventing scrolling in jQuery UI Draggable when using flexbox

In my project, I am looking to organize a container using jQuery UI draggable/droppable feature. Since the elements in my list are arranged in a straight horizontal line, I have utilized display: flex. This arrangement works well when adding new items to ...

React random marker position shifts when the screen size is adjusted

After displaying an image and adding a marker to it, I noticed that the marker's position changes when the screen size is adjusted. Why does this happen? And more importantly, how can I ensure that the marker stays in the same position relative to the ...

Tips for transferring data from ajax to Django views

I have a set of JSON data that looks like the following: [{"item":"Datalogger","hsn":"123","unit_name":"BAG","unit_price":"100","quantity":"6", "tax_c ...

The text alignment function of justify is not functioning properly

Trying to find a way to validate the content of this article, but I'm hitting a roadblock... <p style="text-align:justify;" class="custom-article"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt velit vitae risus t ...

Utilizing a div element within a loop to showcase content in a horizontal layout

I'm currently working on a project where I need to showcase YouTube links on a webpage, accompanied by brief descriptions. To achieve this, I am utilizing a repeater. Below is the item template I have implemented: <Item Template> <asp:Pane ...

The absence of the iframe in ie8 is causing problems that cannot be fixed with relative positioning

On a website, I am integrating an external 2-factor authentication solution called Duo Web using their PHP and Javascript. It works smoothly on all browsers except for IE8. When the user passes the initial login screen, the 2FA login page loads, but the if ...

What is the process for creating a sublist within an md-list-item using Angular Material?

I used Angular Material to create a md-list on the side-nav. I am looking to add a sub list under the md-list-item. Below is my code snippet: <md-sidenav id="sideNav" md-component-id="left" class="md-sidenav-left md-whiteframe-z1 md-locked-open " layo ...

Inheriting vertical height and alignment (inline-block)

I struggle to understand how these things work and I would greatly appreciate it if someone could provide an explanation. 1 http://d.pr/i/6TgE+ why http://d.pr/i/UAZn+ *it's actually 9. Here is the code snippet: <header> <div class=" ...

Checking for the presence of an element prior to moving forward in a selenium and python script

Is there a way to create a loop that runs as long as a specific div element appears on a website? I am trying to navigate through several pages and click the "next" button for each page. The last page does not have the div element I am looking for, so I w ...

How can I transfer the height of a parent div to a child div with absolute positioning?

I'm facing an issue where the child div (.timeline) needs to adjust its height as the parent divs (.tea-history) height increases. However, using height:inherit; didn't work as expected because the child div inherited an auto height from the pare ...

What is causing the background image size to adjust when the carousel is toggled?

Can you help me understand why the background-image increases in size vertically when transitioning from url/path to url/path2? I need it to stay the same size as it toggles through all the images. What mistake am I making and how can I correct it? Snipp ...

Creating an interactive animation of bouncing balls within an HTML5 canvas using JavaScript

function refBalls(){ var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); var circles = [{x:40,y:100,r:20,color:'black',vx:5,vy:10}] function draw(){ ctx.beginPath(); ctx.arc(circles[0].x, circles[0].y, circles[0].r, ...

Executing a .sh script upon loading a webpage

Is there a way to automatically run a .sh file on webpage load to fetch a JSON file using cURL, without making it visible? I need to keep the API key confidential. ...

Javascript: Efficient ways to populate multiple inputs upon clicking

Is there a way to populate all input fields on my page with the id toinput using an onclick button? In this code snippet, only the first input field is currently being filled out. How can I fill out both of these inputs with just one click when launching ...

Adjust the size of the text and save it in a cookie for later use

I am in need of a script that can dynamically increase and decrease the font size on a website while retaining the user's chosen setting even after they return to the site. I believe utilizing cookies is the way to achieve this functionality. Despite ...

Incorporating HTML within PHP

I'm struggling with the following issue: after this, I end up with a blank page. Here is the code snippet in question: I am attempting to use HTML within PHP and then PHP again within HTML. The rest of the code is functioning correctly. If I replace & ...

Show content based on information from an array using JavaScript

I am currently working on developing a user-friendly step-by-step form using AngularJS and UI-router to navigate through different sections. The data collected from each form is stored in a JavaScript array, and I am trying to dynamically show or hide a di ...