Solved

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

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

809 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