Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Yes it is, although CGI isn't directly involved since it's mostly done on the client side with a combination of CSS and JavaScript.

So for example, a quick look at the source of perlcritic.com shows that it primarily uses Bootstrap, see http://getbootstrap.com/. There are nowadays a whole bunch of CSS frameworks available, and several JavaScript libraries, such as jQuery (http://jquery.com/).

There are a couple of Perl web frameworks that are "more modern" than CGI which you might want to look at, see for example Mojolicious or Catalyst. But if you're using CGI, here's an example of how you might tie CSS & JavaScript libraries into your page, assuming you've downloaded http://necolas.github.com/normalize.css/3.0.2/normalize.css and http://code.jquery.com/jquery-1.11.2.min.js to your local directory:

print start_html -style => { -src => [ 'normalize.css', 'mystyle.css' ] }, -script => [ { -type=>"text/javascript", -src=>"jquery-1.11.2.min.js" }, q{ alert("I'm some embedded JavaScript"); } ];

You'll still need to read the documentation of whatever frameworks you decide to use to see how to access their functions, which is usually not a question of Perl but of CSS, HTML and JavaScript. CGI provides a -style argument for most of its HTML functions that can be used to specify CSS classes and other style elements.


In reply to Re: beautiful form(s) with CGI by Anonymous Monk
in thread beautiful form(s) with CGI by adriang

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2022-05-19 01:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (71 votes). Check out past polls.

    Notices?