Solved

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

Posted on 2011-03-08
2
328 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

690 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