Jump to content

Centering code into middle of page

Recommended Posts

Posted (edited)

Site URL: https://www.gothambespoke.co.uk

Hi, 

I'm trying to add a car loan calculator to my website however when added it always loads into the header of the page, I have tried putting images and blocks but still will not move down the page. 

The code is as follows: 

<div class="calconic-calculator"  data-calculatorid="6148b4f11f01fd0021262c5d"></div>
<script>
  (function() { var qs,j,q,s,d=document, gi=d.getElementById,
  ce=d.createElement, gt=d.getElementsByTagName,
  id="calconic_", b="https://cdn.calconic.com/static/js/";
  if(!gi.call(d,id)) { j=ce.call(d,"script"); j.id=id; j.type="text/javascript"; j.async=true;
  j.dataset.calconic=true;
  j.src=b+"calconic.min.js"; q=gt.call(d,"script")[0]; q.parentNode.insertBefore(j,q) }
})();
</script>

 

Many thanks to anyone who comments ! 

 

Edited by Josh777
Spelling
  • Josh777 changed the title to Centering code into middle of page
  • Replies 2
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 years later...
Posted

 

Certainly! Here's an example of HTML code to embed a simple car loan calculator on a webpage. This code assumes you have the necessary JavaScript for the calculator functionality and it's structured to be placed within the body of your HTML document:

Try this code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Your Car Loan Calculator</title>
    <!-- Any necessary stylesheets or scripts here -->
</head>
<body>

<!-- Your website content above the calculator -->

<div class="loan-calculator">
    <!-- This is where your car loan calculator content will be displayed -->
    <h2>Car Loan Calculator</h2>
    <!-- Your calculator HTML and JavaScript code goes here -->
    <!-- Placeholder text -->
    <form id="loan-form">
        <label for="car-price">Car Price:</label>
        <input type="number" id="car-price" name="car-price" required><br><br>
        
        <label for="down-payment">Down Payment:</label>
        <input type="number" id="down-payment" name="down-payment" required><br><br>
        
        <label for="loan-term">Loan Term (in months):</label>
        <input type="number" id="loan-term" name="loan-term" required><br><br>
        
        <label for="interest-rate">Interest Rate (%):</label>
        <input type="number" id="interest-rate" name="interest-rate" required><br><br>
        
        <button type="button" onclick="calculateLoan()">Calculate</button>
    </form>
    
    <div id="loan-result">
        <!-- Calculator results will appear here -->
    </div>
</div>

<!-- Your website content below the calculator -->

</body>
</html>

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.