Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Infoboxes Title Heading, Center and Format


wlpywd

Recommended Posts

Posted

Hello, i have read though the forums, i am sorry if this is obvious! How can i center the title heading of the boxes? I want to do this either in the box itself or through a new entry in the CSS (because i only want to do this to one or two boxes). I have been able to modify the look and contents of the boxes on an individual level, but, i can not make any changes to the heading. Here is my current heading title from the information box:

<!-- information //-->

          <tr>

            <td>

<?php

  $info_box_contents = array('align' => 'center',);

  $info_box_contents[] = array('align' => 'center','text' => BOX_HEADING_INFORMATION);

 

  new infoBoxHeading($info_box_contents, false, false);

 

  $info_box_contents = array();

  $info_box_contents[] = array('align' => 'center','text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a> | ' .

                                        '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a> | ' .

                                        '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a> | ' .

                                        '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 

  new infoBox($info_box_contents);

?>

            </td>

          </tr>

<!-- information_eof //-->

 

Here, in bold, you can see where i THINK i need to do something, but, no matter what i try to do, i either get a parse error on the line or it does nothing:

 

<?php

  $info_box_contents = array('align' => 'center',);

  $info_box_contents[] = array('align' => 'center','text' => BOX_HEADING_INFORMATION);

 

  new infoBoxHeading($info_box_contents, false, false);

 

  $info_box_contents = array();

 

Is this the correct line?? What do i need to do to center it? I cannot figure it out at all....... again, i don't want to change the css because i only want to center the title of just one or two boxes, not all of them.

 

Thank you everyone!! (this is the code from my information box)

  • 4 weeks later...
Posted

Try center the table data cell marked in red hope it works!

 

<!-- information //-->

<tr>

<td align="center">

<?php

$info_box_contents = array('align' => 'center',);

$info_box_contents[] = array('align' => 'center','text' => BOX_HEADING_INFORMATION);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center','text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a> | ' .

'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a> | ' .

'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a> | ' .

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- information_eof //-->

Posted

Or in your stylesheet.css

TD.infoBoxHeading {
?font-family: Verdana, Arial, sans-serif;
?font-size: 12px;
?font-weight: bold;
?background: #FFFFFF;
?color: #ffffff;
?text-align: center

 

The_Bear

Posted

Just on a side note, if you have ever wondered what the false, false bit is in the line: new infoBoxHeading($info_box_contents, false, false);

here's your answer.

 

It tells the script which images to use for the infobox corners.

true, true, means use infobox_corner_left.gif for the left corner, and infobox_corner_right.gif for the right corner

false, false, measn use neither corner gif, but use the corner_right_left.gif instead

true, false, (or false, true) means use the appropriate left or right corner gif for the left or right corner (depending on where the true appears) and use corner_right_left.gif for the other corner - the false.

 

Just an FYI for those that didn;t know and wondered.

 

B)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...