Hello Guys,

how do i use the same style sheet for the forum.

i have my , and i have my ...

what do i do??

Thanks,

Cohen

Dani AI

Generated

A short, practical checklist to make your forum use the same stylesheet as your site (without copying files and creating maintenance headaches). and were on the right track — you want a single source-of-truth for CSS — but do this in a way that avoids duplicated files and broken image/font paths.

Make it central (recommended)

  • Put the master stylesheet in one place (the site root or a common folder) and have the forum reference that single file. Edit the forum’s common header/template once instead of editing every page. If your forum uses a header include, use a server-side include so both site and forum share the same header.

Example server-side include (put this in the forum’s top template so it pulls the site header):

<?php
// in the forum's template/header file
include '/home/youruser/public_html/common/header.php';
?>

Things people often miss

  • Relative URLs inside CSS (images, fonts) break when the CSS is moved or referenced from another folder/subdomain. Convert those paths to absolute URLs or site-root–relative paths.
  • If the forum or site runs HTTPS, load the stylesheet via HTTPS to avoid mixed-content blocking.
  • Third-party fonts may require CORS headers on the server that hosts them.
  • Browser/server/CDN caching can hide updates; use a version query string when you change the file.

Quick troubleshooting

  • Open the browser DevTools Network tab to confirm the CSS loads (200) and there are no 404s or mixed-content warnings.
  • If changes don’t appear, clear the browser cache and any server/CDN cache.
  • If you can’t find the header, search your forum theme folder for the template used by all pages (often a header file or template in the theme directory) and edit that one file.

Follow these steps and you’ll keep styles consistent without copying and chasing updates across two places.

Recommended Answers

All 8 Replies

This line references the Style sheet for your Home:

<link href="style.css" rel="stylesheet" type="text/css" media="screen" />

You show two stylesheets for your forum:

<link rel="stylesheet" type="text/css" href="" />
	<link rel="stylesheet" type="text/css" href="" media="print" />

The second one looks like a print stylesheet, so just change the relevant entries in the first one, or substitute the home style sheet.

Thanks,

You might also be able to help out with my other problem - http://www.daniweb.com/forums/thread164847.html - It would be great if you could!

Also, where do i insert the code??? do i get the style sheet on the forum or what???

Thanks,

Cohen

The easiest way might be to copy style.css to your forum folder and change this line:

<link rel="stylesheet" type="text/css" href="" />

To:

<link href="style.css" rel="stylesheet" type="text/css" media="screen" />

Your other problem is a bad link:
This:
a href=""
Should be:
a href="#"
Note that your other menu links need to be changed also.
You can read more about how links are formed here:
http://www.w3schools.com/HTML/html_links.asp
I think I have all that right, but let me know if anything gets broken.

The easiest way might be to copy style.css to your forum folder and change this line:
<link rel="stylesheet" type="text/css" href="" />
To:
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />

Where do i change this line??? i can't find it... i have copied the style.css file to my forum folder, now what?

Sorry, i'm a newb at this.

Cohen

On this page:

In Dreamweaver I believe this can be seen in Code View
I'm not a php expert, but every page will need to reflect this change if you want them all to use this stylesheet.

On this page:

In Dreamweaver I believe this can be seen in Code View
I'm not a php expert, but every page will need to reflect this change if you want them all to use this stylesheet.

Alright, Thanks for your help.

:)

Cohen

css file include in home page's html code..

Alright, i have a bit more of a play with it...

I'll do that sometime this week and get back to you guys.

Thanks,

Cohen

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.