Skip navigation
evh9573
Currently Being Moderated

dreamweaver cs3 - CSS not rendering when opening pages - Please help!

Aug 19, 2012 3:25 AM

Tags: #cs3 #help #template #dreamweaver

I am using Dreamweaver CS3 and have built quite a few (basic) websites previously so not a complete novice but am totally thrown by my CSS not rendering properly in a new website I am building.

 

I have set up a new template, all working fine, full CSS included, previewing in browser ok.

 

Then created 2 new pages from this template 'Aug.html' and 'Oct.html' and saved both - both pages contain a link to each other and both preview fine in the browser on their own.

 

However when I click on the either link from either page, doesn't matter which page I start with, the result is the same, the new page that opens seems to forget half the CSS, div's completely move and links are reverted back to blue and underlined, everything is changed as if there is no CSS at all. 

 

Why does the CSS not work here? I have never had this problem before, the CSS is simple, I have about 6 div's to contain everything in, including a #wrapper. body tags and a:links all preview fine until I click and the new page that opens up looses its CSS. There are no accessibility / compatibility issues coming up either.

 

Please help - have tried so many different things now I am totally lost! I know it must be simple but I really can't find an obvious reason why, really need help with this.

 

Thanks....

 
Replies
  • Currently Being Moderated
    Aug 19, 2012 5:16 AM   in reply to evh9573

    Welcome -

    A link to your online page wiil enable us to spot your problem.

    Sounds like a pathing issue on the link to your CSS.

    Possibly a case issue on a *nix server

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 19, 2012 5:35 AM   in reply to evh9573

    Your concern is quite valid, That merely elininates the problem link without knowing what was wrong with it.

     

    Please follow my request and post a link to a renamed copy of the problem page online so we can resolve the real issue.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 19, 2012 7:15 AM   in reply to evh9573

    However when I click on the either link from either page, doesn't matter which page I start with, the result is the same, the new page that opens seems to forget half the CSS, div's completely move and links are reverted back to blue and underlined, everything is changed as if there is no CSS at all.

     

    You must be referring to what happens when you PREVIEW a page in DW, is that correct?  In other words, you preview page A, click the link to page B, and page B appears without the CSS - correct?  Here's why -

     

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

     

    Your link to the stylesheet is a ROOT relative link (see the leading "/"?).  When page B loads after clicking on the link in page A, it tells the browser to find the stylesheet at "C:/2012LG_CSS.css" because the browser has NO idea where the root of the DW site is and assumes that the root reference in the link refers to the root of the hard drive.  Normally, one would not use root relative links unless one had a good reason to do so - in your case, I'm confident you do not.  Change that link to a document relative one, i.e.,

     

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

     

    and things will work much better.

     

    Generally speaking, it's not a good idea to click away from any previewed page when using DW.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points