Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror

Comment left-field suggestion : CSS (Score 1) 156

OK. I know this is gonna be controversial. But isn't the whole point of separating HTML from CSS about separating style from content?

Done right, the XHTML page is just a hierarchical data-structure. It's rightly part of the program and so part of the programmer's domain. CSS gives you all the control you need over the *appearance* of the page.

So I say the designers shouldn't mess with anything except style-sheets. No PHP, no HTML templates, nothing but CSS.

Of course, although XHTML and Javascript are part of your program, they're a special part of the code which gets executed in the browser. By all means you should also have a good strategy for encapsulating them away from the rest of your code. Have some kind of templating system if you like.

But it's a mistake to think this is the *same* separation as the firewall you want to put between coders and designers.

The problem is, of course, the *tools* aren't set up for this. Dreamweaver et al. imagine that the designer will be creating the actual HTML. I'm not sure if there are tools that support the separation I'm suggesting (but you know, toolbuilders, there should be) but it seems to me crazy that we're trying to invent and police the firewall between coders and designers when it already exists.

As for code and "content" if you mean the text and images on your site, these should probably be in a database or CMS of some kind rather than embedded directly into the HTML.

Slashdot Top Deals

"The following is not for the weak of heart or Fundamentalists." -- Dave Barry

Working...