Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

valign top

by malaga (Pilgrim)
on Aug 13, 2005 at 08:56 UTC ( #483510=perlquestion: print w/replies, xml ) Need Help??

malaga has asked for the wisdom of the Perl Monks concerning the following question:

i'm calling some print statements from an external file - just some simple html. valign seems like it's printing out alignment at the bottom instead of top of the file.
include_file: sub printstatement { print <<'END'; <table> <tr> <td valign="top"> END } perlscript: include include_file; & printstatement; spit out some stuff;
i get a cell with text aligned at the bottom. can't get anywhere with this. help appreciated.
Malaga

Replies are listed 'Best First'.
Re: valign top
by Joost (Canon) on Aug 13, 2005 at 10:09 UTC
Re: valign top
by neniro (Priest) on Aug 13, 2005 at 09:30 UTC

      It would probably be a better idea to use a real validator thus fixing the errors in the source rather then always running the same errors through a fix-up script.

Re: valign top
by CountZero (Bishop) on Aug 13, 2005 at 12:05 UTC
    It looks like you could really use some form of templating framework.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re: valign top
by malaga (Pilgrim) on Aug 13, 2005 at 19:48 UTC
    you're right. this is a bad post. i was going on 24 hours of no sleep and i didn't test enough before i posted. i just tested a simplified version of the code and there's no problem with valign. for the sake of answering the question i'll post the code, but as i said, it works. this lazy method i'm using probably "breaks" the html somehow, because the tags in format.pl are right but the valign tag isn't getting picked up. or maybe i'm still smoking crack. anyway, i have to graduate to a better way of handling html on this one. thanks again for the suggestions and the ass-kicking. i know i'm loved.

    Perl script:
    require "format.pl"; & startcontent; #PRINT THE SUBMENU CONTENT FOR THE SELECTED MENU ITEM open (FILE, $content) or die "Can't open file!"; my @scoop = <FILE>; close(FILE); foreach my $sline(@scoop) { print $sline; } & endcontent;
    format.pl:
    sub startcontent{ print <<'END'; <table> <tr> <td valign="top"> END }
    Malaga
Re: valign top
by malaga (Pilgrim) on Aug 13, 2005 at 12:47 UTC
    ok ok...I can't get away with anything around here!! I'll do some homework and bring myself up to speed, but I still don't understand why the valign tag isn't being spit out just like all the others. thanks for the help!
    Malaga
      I still don't understand why the valign tag isn't being spit out just like all the others. thanks for the help!

      Since you show no code that indicates how "all the others" are printed, how are we supposed to know?

      also (from the OP. emphasis mine):

      valign seems like it's printing out alignment at the bottom instead of top of the file.
      I interpreted that as "the text in the cell is aligned to the bottom instead of the top". (Also note that CGI scripts usually don't print to a file at all). Since you don't provide the HTML output, and only the barest minimum of code, and your description problem appeared to be HTML related, how do you suppose we can help you?

      Please read how (not) to ask a question.

Re: valign top
by malaga (Pilgrim) on Aug 13, 2005 at 11:08 UTC
    i did find one other post on this when i searched valign - but no solution. so i thought maybe it was a perl problem. sorry folks.
    Malaga
      Its not a perl problem unless perl complains

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2020-10-20 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (208 votes). Check out past polls.

    Notices?