Skip to main content
Participant
April 5, 2017
Answered

Dreamweaver: No presenta las CSS

  • April 5, 2017
  • 2 replies
  • 374 views

Estoy haciendo un sitio, y a la hora de poner menú y pie de página los retiro en archivos aparte y los meto en una carpeta llamada constructores. Luego copio el código HTML del index original a cada fichero y borro el original, poniendo los includes. Pero no coge la hoja de estilos ni el javascript. ¿Por qué? Creo que es algo de las ubicaciones pero no lo entiendo muy bien. (Creo haberme explicado bien)

This topic has been closed for replies.
Correct answer Nancy OShea

Include files should not contain links to JS or CSS files.   Those links go inside the <head> tag of your parent document.

Include files are for the relevant menu & footer code only.

Examples:

<nav>

     <ul>

          <li><a href="page1.php">Link 1</a></li>

          <li><a href="page2.php">Link 2</a></li>

          <li><a href="page3.php">Link 3</a></li>

     </ul>

</nav>

<footer> © 2017.  XYZ Website.  </footer>

2 replies

Nancy OShea
Community Expert
Nancy OSheaCommunity ExpertCorrect answer
Community Expert
April 5, 2017

Include files should not contain links to JS or CSS files.   Those links go inside the <head> tag of your parent document.

Include files are for the relevant menu & footer code only.

Examples:

<nav>

     <ul>

          <li><a href="page1.php">Link 1</a></li>

          <li><a href="page2.php">Link 2</a></li>

          <li><a href="page3.php">Link 3</a></li>

     </ul>

</nav>

<footer> © 2017.  XYZ Website.  </footer>

Nancy O'Shea— Product User & Community Expert
BenPleysier
Community Expert
Community Expert
April 5, 2017

When you include a file, your are placing its contents into the main document. If the main document resides in the root directory, then the associated CSS and JS files should be linked relative to the root directory.

As an example, my builders/includefile.html has a link to ../css/mystyles.css. This will not work once the code is included into the main document, this should read css/mystyles.css

Hopefully, I have explained it properly.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Participant
April 5, 2017

Pero ¿cómo modificar el código en el principal si solo tiene un include al includefile.html?

BenPleysier
Community Expert
Community Expert
April 5, 2017

The link in the include file needs to be adjusted.

Please give me the code for the include file and I will show you exactly what to do.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!