Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: TT2 -- A Matter of Style

by gothic_mallard (Pilgrim)
on Jun 14, 2002 at 15:38 UTC ( #174575=note: print w/replies, xml ) Need Help??


in reply to TT2 -- A Matter of Style

Just a quick point of "styles" - You say that it's better to use CGI.pm for printing the line with a style attribute. Really it's even better than that to create the basic tag with CGI.pm and leave the style to an external Cascading Style Sheet (CSS) file.
That way you can truly seperate presentation from content and implementation.

Never forget, just because this code is being dynamically generated / templated that you shouldn't use proper HTML "style".

J.

Replies are listed 'Best First'.
Re: Re: TT2 -- A Matter of Style
by BrowserUk (Pope) on Jun 15, 2002 at 09:51 UTC

    This will probably get castigated for being OT - but maybe this deep in a related thread it won't get noticed:)

    Has anyone an opinion or a reference as to why the powers that be opted to require the use of class="someclass" for css/css2/XML?

    It struck me in my recent work with CGI/XML::Simple (see, it's Related!:) that 'they' missed a trick here. Instead of:

    <html><head><style> .someclass { ... } </style></head><body> ... <div class="someclass">This text has some class!</div> ... </body></html>

    Wouldn't it have been simpler, cleaner etc. to allow:

    <html><head><style> someclass { ... } </style></head><body> ... <someclass>This text has some class!</someclass> ... </body></html>

    That is to say: Why not allow the browser to render the XML directly in the browser by attaching the css directly to the XML tagged data?


    I appreciate that this is a meta discussion.. and do not expect an "answer" as such - but if anyone knows or has an opinion I would be interested to hear it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://174575]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2019-06-25 11:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (105 votes). Check out past polls.

    Notices?