Solved

shift text right (or center under picture table) in cgi script

Posted on 2011-03-08
2
301 Views
Last Modified: 2013-12-25
I'm using the code below but I want to center the text "Photograph by name" under the picture it is currently left aligned from what I can see. Also, I could shift it to the right a few characters but I am not sure how to do that

print "</table>\n";
print "<p>&nbsp;</p>\n";
print "<table align=center width=800px cellpadding=15 cellspacing=0 id=gray_top_border>\n";
print "<tr>\n";
print "<td>\n";
print "<h3 class=no_margin-top><a href=/path/fcst/index.cgi>Vog Forecast Discussion</a></h3>\n";
print "<p><a href=/path/index.cgi><img src=/path/image.jpg alt=\"Big Island logo image\" width=220 height=220 /></a></p>\n";
print "<p><em>Photograph by Name</em></p>\n";
print "<p><a href=/path2/index.cgi>Daily discussion</a> that explains in words the expected distribution of vog concentrations over the Hawaiian Islands as a result of the interaction of the volcanic emissions and the current and forecast weather.  </p>\n";
print "</td>\n";
print "<td>\n";
0
Comment
Question by:libertyforall2
2 Comments
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 35079854
Much easier to read/write and maintain if you get rid of all those individual print statements.

Try this:

print <<EOF;
</table>
<p>&nbsp;</p>
<table align=center width=800px cellpadding=15 cellspacing=0 id=gray_top_border>
<tr>
<td>
<h3 class=no_margin-top><a href=/path/fcst/index.cgi>Vog Forecast Discussion</a></h3>
<p><a href=/path/index.cgi><img src=/path/image.jpg alt="Big Island logo image" width=220 height=220 /></a></p>
<p align="center"><em>Photograph by Name</em></p>
<p><a href=/path2/index.cgi>Daily discussion</a> that explains in words the expected distribution of vog concentrations over the Hawaiian Islands as a result of the interaction of the volcanic emissions and the current and forecast weather.</p>
</td>
<td>
EOF

Open in new window

0
 

Author Closing Comment

by:libertyforall2
ID: 35404726
Great!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now