3 Replies - 385 Views - Last Post: 24 September 2013 - 10:53 PM

#1 wazzag  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 25-June 06

Working with CSS and PHP?

Posted 24 September 2013 - 02:31 PM

Hi,
Not sure if this belongs here or in the PHP forum so sorry if I got it wrong.

I'm just starting on Web Dev and i'm a bit confused as to the usual process when developing a PHP based site.
In my setup the .php files are generating HTML (after extracting stuff from a database).
I don't get to see the HTML as the web browser effectively runs the php code and renders the HTML along with any css file(s) specified.

Can I use a WYSIWYG CSS editor to drag/drop my elements about (if so, how?) or is it a case of editing the CSS in a text editor and refreshing the page each time (seems a bit primitive)?

Is This A Good Question/Topic? 0
  • +

Replies To: Working with CSS and PHP?

#2 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3808
  • View blog
  • Posts: 13,508
  • Joined: 12-December 12

Re: Working with CSS and PHP?

Posted 24 September 2013 - 02:38 PM

You can see the resulting HTML if you right-click your page in the browser and choose View Source (or similar). You can then copy and paste this.

If you learn to use the browser's console - there are links in my signature - then you can modify the css directly in the browser and see the effect of your changes. (Modifying the html is generally not quite so easy.)

Once you've copied your HTML there are a number of WYSIWYG editors. IIRC Kompozer is one, and there's DreamWeaver (if you must!). There must be others but I don't use them.

TopStyle Lite was quite good for modifying css, and seeing the results straight-away, but I don't know if the free version is still available. There will be a trial version though.

This post has been edited by andrewsw: 24 September 2013 - 02:42 PM

Was This Post Helpful? 1
  • +
  • -

#3 wazzag  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 25-June 06

Re: Working with CSS and PHP?

Posted 24 September 2013 - 03:30 PM

Excellent, thanks andrewsw. Very very helpful indeed. I'm going to do exactly as you say in conjunction with becoming familiar with firebug.
Many thanks again!
Was This Post Helpful? 0
  • +
  • -

#4 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3576
  • View blog
  • Posts: 10,441
  • Joined: 08-June 10

Re: Working with CSS and PHP?

Posted 24 September 2013 - 10:53 PM

View Postwazzag, on 24 September 2013 - 11:31 PM, said:

I don't get to see the HTML as the web browser effectively runs the php code and renders the HTML along with any css file(s) specified.

dead wrong. it is of utmost importance to understand that server-side code (PHP) is exclusively executed on the server and client-side code (HTML, CSS) is only executed on the client/browser. and that PHP only creates HTML.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1