Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Search box module editing


woodpress

Recommended Posts

Howdy,

 

So here's the question. I've been redesigning the osc pages a bit at

http://www.sixthandspringbooks.com/catalog/index.php

 

What I am banging my head against the wall is about the search box in the upper right corner. My "search" title keeps floating out of alignment. I'd like to have it centered right on top of the search box. Everytime I try to move it the entire page blows up. Any suggestions? Also I want to have it show up about 5 pixels lower than it is right now. My greatful thanks to any wisemen who can answer this puzzle. Below is my box code.

 

<?php

/*

$Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- search //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_SEARCH);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

 

$info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),

'align' => 'center',

'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . '?' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '');

new infoBox($info_box_contents);

 

?>

</td>

</tr>

<!-- search_eof //-->

Link to comment
Share on other sites

This is just a guess, and I could be very wrong, but I think it's because the word "search" is the infobox header, so the placement is controlled by the same class as the word "browse" over on the left column.

 

Maybe you could create a class for just that box header? Or leave the box header blank and place "search" inside with the infobox contents?

 

Hope this helps.

 

Cathi

Link to comment
Share on other sites

Thanks Cathi, interesting idea. I looked into it and changed the class comment, but that didn't effect it at all.

 

Any other ideas?

this may seem a little convoluted but it works.

go to catalog/stylesheet.css

copy the TD.infoBoxHeading { all the way to the }

Paste it under the } and name it something like TD.infoBoxHeading1 {

then go to catalogincludes/boxes/search.php.

change at about line 20 new infoBoxHeading($info_box_contents, false, false);

to new infoBoxHeading1($info_box_contents, false, false);

then make changes to the stylesheet in the code you pasted and renamed.

You can change alignment valign etc.

 

 

mine looks like this: (colors are a little wild):

catalog/stylesheet.css

 

TD.infoBoxHeading {

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

font-size: 10px;

font-weight: bold;

background: #69be36;

color: #ffffff;

 

}

TD.infoBoxHeading1 {

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

font-size: 10px;

font-weight: bold;

background: #f85c8e;

color: #ffffff;

}

 

 

catalogincludes/boxes/search.php.

 

 

 

new infoBoxHeading1($info_box_contents, false, false);

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

  • 3 weeks later...

Sadly Bill, that did not work.

 

The problem that I have is that the search box looks like this:

 

search

[ ] Go

 

When I need it to look like:

 

search [ ] Go

 

 

Everytime I move the call to for the "search" title it seems to blow up the page.

 

Anyone else have a suggestion?

 

Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...