Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
How to include the CSS for a div you are loading from another page

I am attempting to load content from a div on one page of my site to another page on my site on page-load.

The following (example) code seems to achieve that effectively.

However... how would I also include all of the CSS associated with the content?

Any help would be greatly appreciated.

SOURCE PAGE

<!DOCTYPE html>

<html>

<head lang="en">

<link rel="stylesheet" href="exampleStylesheet.css">

</head>

<body>

<div>SOURCE CONTENT HERE</div>  

</body>

</html>

LANDING PAGE

<!DOCTYPE html>

<html>

<head lang="en">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

</head>

<body>

<div id="loadedContent"></div>

<script>

$('#loadedContent').load("contentToLoad.html"); <!-- loads other page's content -->

</script>

</body>

</html>

EXAMPLE CSS

body {

margin: 0;
background-color: blue;

}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!