westmidsguy Posted October 28, 2009 Posted October 28, 2009 how do i input a search box at the top left of my header so I can search for products? thanks
alex121 Posted October 28, 2009 Posted October 28, 2009 I found the easiest for me was to put it into a table cell like this: <?php require(DIR_WS_BOXES . 'search.php'); ?></td> Hope this helps.
westmidsguy Posted October 28, 2009 Author Posted October 28, 2009 Yes that works fine but I would like the search box at the left hand side how do i go about doing this? The code you gave me currently centres the search box in the middle. Many thanks.
alex121 Posted October 28, 2009 Posted October 28, 2009 Sorry left out the first <td> tag, but here is an alternative you might like to try: <td align="left" valign="middle"><?php require(DIR_WS_BOXES . 'googlesearch.php'); ?></td> You can leave the valign="middle" section out if you wish, i only use it align the text in the centre. Hope this is better for you
westmidsguy Posted October 29, 2009 Author Posted October 29, 2009 that doesnt make the search box on the left ;(
a.forever Posted October 29, 2009 Posted October 29, 2009 If you're talking about the left column, you'll need to modify catalog/includes/column_left.php (or column_right.php). Cut or copy the line you want into the other.
alex121 Posted October 30, 2009 Posted October 30, 2009 that doesnt make the search box on the left ;( Okay, my header file has been edited to have several tables, so here is a simple table that seems to work for me when i tested it. <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left">search box</td> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> </table>
alex121 Posted October 30, 2009 Posted October 30, 2009 Just a quick point, the line 'pixel_trans.gif', '100%', '10'); is for a transparent spacer used to create a blank area which is: 100% = width of the whole space left after the search box table cell and the 10 = 10px is a nominal figure for the height, but it does not seem to matter much if it is 1, 10 or more.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.