Solved

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

Posted on 2011-03-08
2
315 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 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