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

151
Views
Cómo incluir el CSS para un div que estás cargando desde otra página

Estoy intentando cargar contenido de un div en una página de mi sitio a otra página de mi sitio al cargar la página.

El siguiente código (de ejemplo) parece lograrlo de manera efectiva.

Sin embargo... ¿cómo incluiría también todo el CSS asociado con el contenido?

Cualquier ayuda sería muy apreciada.

PÁGINA FUENTE

 <!DOCTYPE html> <html> <head lang="en"> <link rel="stylesheet" href="exampleStylesheet.css"> </head> <body> <div>SOURCE CONTENT HERE</div> </body> </html>

PÁGINA DE DESTINO

 <!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>

EJEMPLO 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!