SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict mmanders's Avatar
    Join Date
    Jul 2006
    Location
    Edinburgh, Scotland
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Link to stylesheet in includes or just main?

    Hi,

    I have a question regarding linking stylesheets and page includes. I have a php page that will feature the same navigation on each page. I thought I would design this navigation separately and include it in each page with php. Given that the include file and the main page will be using the same style sheet, should I link to the stylesheet in the main page only, and have the includes inherit the style when loaded? Or should I link to the stylesheet in the include also? If I link in the include file, I will see what the navigation will look like, but will the two links cause a conflict?

    Cheers,
    Max

  2. #2
    SitePoint Guru Dashman's Avatar
    Join Date
    Jan 2006
    Location
    Manchester, UK
    Posts
    627
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi...
    the two linked style sheets wont conflict, if they aqre the same stye sheet or if they both contain the same rules etc.
    Generally best practice to only link to it from the main page, and, if you really need to, link to the style sheet in the include file during testing...and then remove it

  3. #3
    SitePoint Addict mmanders's Avatar
    Join Date
    Jul 2006
    Location
    Edinburgh, Scotland
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks for the reply - I was hoping you'd say that


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •