Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hiding Table Headers (css)


yellowmonkey

Recommended Posts

Hi Guys,

 

I am trying to hide the table headers for the category and information boxes. This is working fine in IE6, but in Firefox it is leaving a gap above the table where the header would have been.

 

I have used the following css to hide the table headers:

 

.productListing-heading {
 display: none;
 overflow: hidden;
 width: 0;
 height: 0;
}

TD.infoBoxHeading {
 display: none;
 overflow: hidden;
 width: 0;
 height: 0;
}

 

but neither of these is working in FF2.

 

This link will allow you to compare it in the two browsers. It's easiest to see on the information box at the bottom of the page, which sits nicely beneath the footer in IE6, but has a gap in FF2.

 

Any advice much appreciated.

 

YM.

Link to comment
Share on other sites

Tables are block-elements which are producing a linefeed. Due to the fact that you are just hiding the table-cells and not the tables themselves you will always get those gaps until you hide the tables.

 

As a workaround you can go to all those php files which define the boxes and comment the box header part out, so the complete tables won't show up. In IE it will make no difference, but FF will show the page then the way you want it.

Link to comment
Share on other sites

Can anyone advise which parts need commenting out please?

 

I have tried playing around with shop/includes/categories.php but not managed to hide the table header as yet.

 

Basically just want to hide the table header for the categories box (left menu) and then the information box (bottom of screen).

 

Any advice much appreciated. YM.

Link to comment
Share on other sites

	function infoBoxContents($contents) {
  $this->table_cellpadding = '3';
  $this->table_parameters = 'class="infoBoxContents"';
  $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);
}
 }

 

To comment this line out removes the leading table cell and mgiht close the gap. Other than that, you might want to play around with the cellpadding value.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...