Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to changed the left column(info box) background color


peter888

Recommended Posts

I tried to change the background color for left column(only the info box's background color).

I changed the folowing style sheet, after I changed, the all info boxs background colors changed,

But I just want to change the left column info's box background color only

For example, just change the Categories's background. anyone knows how to change.

 

Thanks

 

 

.infoBoxContents {

background: #ffffff;/*I know change from here , but it will change all the info box's background color*/

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

}

 

 

Thanks for help

Link to comment
Share on other sites

anyone knows where to find the code <tr class="infoBoxContents"> for

Categories.php file. I am going to Just put a new class name there in place of "InfoBoxContents"

Thanks

 

/includes/column_left.php should point you to the right direction

Link to comment
Share on other sites

/includes/column_left.php should point you to the right direction

 

 

From the /includes/column_left.php , and Categories.php files, I can not find any files

 

include the code <tr class="infoBoxContents"> . I need find the code <tr class="infoBoxContents">in place of "InfoBoxContents" a new class name

 

then define new calss in stlysheet.css

 

 

???

Link to comment
Share on other sites

Add the following code to your /includes/classes/boxes.php:

 

 class infoBox_new_bg extends tableBox {
   function infoBox($contents) {
     $info_box_contents = array();
     $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
     $this->table_cellpadding = '1';
     $this->table_parameters = 'class="infoBox"';
     $this->tableBox($info_box_contents, true);
   }

   function infoBoxContents($contents) {
     $this->table_cellpadding = '3';
     $this->table_parameters = 'class="infoBoxContents_new_bg"';
     $info_box_contents = array();
     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
     for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
       $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
                                          'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
                                          'params' => 'class="boxText"',
                                          'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
     }
     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
     return $this->tableBox($info_box_contents);
   }
 }

 

And then alter line 134 in your /includes/boxes/categories.php into

 

new infoBox_new_bg($info_box_contents);

 

And add a class infoBoxContents_new_bg to the stylesheet.css and you'll be done.

Link to comment
Share on other sites

Hi, Thanks for reply, I just changed the <tr class="infoBoxContents">

for following account.php, account_histoty_info.php, advance_search.php, checkout_payment.php.............

for all the files include the code <tr class="infoBoxContents">

 

all the Files I changed the " infoBoxContents " to a new name, then defined the new name for different bg color in stylesheet.css,

 

It much work... finally, the background for each info box is different.

 

Anyway, Thanks you.

Link to comment
Share on other sites

Hi, Thanks for reply, I just changed the <tr class="infoBoxContents">

for following account.php, account_histoty_info.php, advance_search.php, checkout_payment.php.............

for all the files include the code <tr class="infoBoxContents">

 

all the Files I changed the " infoBoxContents " to a new name, then defined the new name for different bg color in stylesheet.css,

 

It much work... finally, the background for each info box is different.

 

Anyway, Thanks you.

 

I've understood, that we were talking about the categories box on the left. The only way to change it is the way I've mentioned. But anyways, if you reached your goal, it's ok with me.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...