Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how do i make the left and right columns have no bg???


Kristofor

Recommended Posts

Posted

hi,

i want to make it so the left and right column boxes have no background, so that when i have an image put behind them it will look fine. cause at the moment, i see bits of my background, and then the infoboxes, and the infoboxes need to have no background so that the background is seen all the way through,

 

www.righthereit.com/default.php

 

have a look at the left column, i want to be able to see the background, without infobox interference ok,

 

thanks

kristofor

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Posted

Just edit the Stylesheet.

 

If you want to keep the background in the main page, just create another style and rename the style in the files in " catalog-dir/includes/boxes/ "

Posted

explain, what you mean, what stuff do i need to edit in the boxes file??

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Posted

sorry, my fault.

to keep the layout in the middle of the page, you have to create a new class.

Here is how i did it.

 

go to " catalog-dir/includes/classes " and open the file "boxes.php"

 

On line +- 140 a function ends and a new class starts

      if ($direct_output) echo $tableBox_string;



     return $tableBox_string;

   }

 }



//here starts a new class.  

 class searchBox extends tableBox {

   function searchBox($contents) {

 

On the line prior to where the new class starts, you can create a new class.

(this line in the above code " //here starts a new class "

The class i created there is the following:

  class infoBoxMain extends tableBox {

   function infoBox($contents) {

  $info_box_contents = array();

  $info_box_contents[] = array('text' => $this->infoBoxContentsMain($contents));

  $this->table_cellpadding= '1';

  $this->table_parameters = 'class="infoBoxMain"'; // <-- here is where a style is jused from the stylesheet file

  $this->tableBox($info_box_contents, true);

}



function infoBoxContentsMain($contents) {

  $this->table_cellpadding= '3';

  $this->table_parameters = 'class="infoBoxContentsMain"'; // <--here is where a style is jused from the shylesheet file

  $info_box_contents = array();

  $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

  $size = sizeof($contents);

  for ($i=0; $i<$size; $i++) {

    $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="boxText"', 'text'=> $contents[$i]['text']));

  }

  $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

  return $this->tableBox($info_box_contents);

}

 }

 

My class is for the main page. (class infoBoxMain)

You can rename the class to something else if you like.

then in the files in the directory "catalog-dir/includes/boxes" i changed the following (at the bottom of the file):

 

  new infoBox($info_box_contents);

 

to:

  new infoBoxMain($info_box_contents);

 

Then in the "catalog-dir" in the file "stylesheet.css" i entered the following:

.infoBoxMain {

 background: #FFFFFF; // for a white background. for no background at all, make it empty.

}



.infoBoxContentsMain {

 background: #ffffff; // for a white background.

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

 font-size: 10px;

}

 

Hope my explanation is clear, if not just shoot.

 

Ps. i would advise to insert text at the beginning and at the end of the code you change, if it doesn't work, you can easily locate the changed parts. for example at the beginning: // start alternate code

end at the end: // end alternate code

Posted

ok,

iv done all that, however, when i do that, nothing shows up in the box, all i get is the heading of the box,

how do i make the contents of the box show???

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Posted

figured it out, the class code was wrong.

this is what you said

 class infoBoxMain extends tableBox { 

   function infoBox($contents) { 

    $info_box_contents = array(); 

    $info_box_contents[] = array('text' => $this->infoBoxContentsMain($contents)); 

    $this->table_cellpadding= '1'; 

    $this->table_parameters = 'class="infoBoxMain"'; // <-- here is where a style is jused from the stylesheet file 

    $this->tableBox($info_box_contents, true); 

  } 

   

  function infoBoxContentsMain($contents) { 

    $this->table_cellpadding= '3'; 

    $this->table_parameters = 'class="infoBoxContentsMain"'; // <--here is where a style is jused from the shylesheet file 

    $info_box_contents = array(); 

    $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); 

    $size = sizeof($contents); 

    for ($i=0; $i<$size; $i++) { 

      $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="boxText"', 'text'=> $contents[$i]['text'])); 

    } 

    $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); 

    return $this->tableBox($info_box_contents); 

  } 

 }

should be

 class infoBoxMain extends tableBox { 

   function infoBoxMain($contents) { 

    $info_box_contents = array(); 

    $info_box_contents[] = array('text' => $this->infoBoxContentsMain($contents)); 

    $this->table_cellpadding= '1'; 

    $this->table_parameters = 'class="infoBoxMain"'; // <-- here is where a style is jused from the stylesheet file 

    $this->tableBox($info_box_contents, true); 

  } 

   

  function infoBoxContentsMain($contents) { 

    $this->table_cellpadding= '3'; 

    $this->table_parameters = 'class="infoBoxContentsMain"'; // <--here is where a style is jused from the shylesheet file 

    $info_box_contents = array(); 

    $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); 

    $size = sizeof($contents); 

    for ($i=0; $i<$size; $i++) { 

      $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="boxText"', 'text'=> $contents[$i]['text'])); 

    } 

    $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); 

    return $this->tableBox($info_box_contents); 

  } 

 }

hehehe, oh well, that works now, just have to figure out how if i have a background for the coloumn which i do,how do i restrict the size of the boxes and make them stay in the center of the coloumn even though the column is biger i dont want them to span the whole column just sit in the middle.

 

ok

thanks

kristofor

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Posted

The size of the boxes and have them aligned in the middle can you alter by changing

<table border="0" width="100%" cellspacing="3" cellpadding="3">

 <tr>

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

to

<table border="0" width="100%" cellspacing="3" cellpadding="3">

 <tr>

   <td width="<?php echo BOX_WIDTH; ?>" align="center" valign="top"><table border="0" width="<?php echo BOX_WIDTH_BOXES" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

 

in all the files in the catalog dir.

Than in application_top.php just define BOX_WIDTH_BOXES

(around line 153)

Posted

ahh ok,

so the BOX_WIDTH wil control the column width?? and the BOX_WIDTH_BOXES will control the width of the boxes?

php is so simple when you know what your doing hahaha, thing is i got no clue hehehe,

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Posted

Yes BOX_WIDTH controls the width of the left column.

And BOX_WIDTH_BOXES will set the size of the boxes that are in the left column.

Posted

cool, thanks, just gonna try it now,

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Posted

nup, that didnt work, the boxes stay the same size as the column,

what could be stuffing up,

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Posted

strange.

when i look thru the code, there is nowhere a size defined (besides infoBox, where the table box is 100%, but that is the width that you've define width BOX_WIDTH_BOXES.

 

check it later.

can't think now, to late (02:00) :wink:

Posted

hehehe, yeh, ok, while im waiting for you, hehehe, wonder if anyone else can help me, hehehe, maybe someone knows something in the code we dont, hehehe,

ok

thanks anyway

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Archived

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

×
×
  • Create New...