Skip navigation
jwcalvert
Currently Being Moderated

CSS needs PHP to execute in order to render in Dreamweaver CS6

Jul 31, 2012 7:22 AM

When I view my web pages while in Dreamweaver, I need a piece of PHP code ( called ws_general.php ) to execute in order for the CSS to render.

The pages do look fine when in a browser but I would like to solve this to better test my pages while in Dreaweaver.

 

I have looked through various solutions but with no luck.

 

I am using:  Windows 7 SP1

Dreamweaver CS6, build 5842

 

Thanks

 
Replies
  • Currently Being Moderated
    Jul 31, 2012 7:48 AM   in reply to jwcalvert

    Let's see the code on your page (a link to the live page would be a good start, but if PHP is involved, we'll need to see the raw code as well).  By default, DW does not require any PHP to render CSS properly.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 31, 2012 8:42 AM   in reply to jwcalvert

    Yes - that helps.  You will not see the CSS rendered in Design view when it is generated on the fly as you show here.  However, you can make use of a design-time stylesheet to cause DW to explicitly load another stylesheet which is used to render the page for Design view.  This "DT Stylesheet" would contain the rules/styles as generated from this PHP file.  While not optimal (since there are two separate stylesheets involved here, you would have to keep them synched for your local display), it is quite workable.  Does that help?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 31, 2012 8:42 AM   in reply to jwcalvert

    Is there a specific reason you are using php in there? It seems needlessly complex since all you're doing is defining CSS attributes with it.

     

    I would turn it into a .css file, then move all of the defined colors and other attributes to their proper positions in place of the php snippets. That will work correctly in DW then.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 31, 2012 11:25 AM   in reply to jwcalvert

    Your use of PHP to give you this option is the only way to achieve your stated goals that I know of.  The price you pay for this convenience may be too high, though.

     
    |
    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