Guest Posted April 1, 2008 Posted April 1, 2008 I have just added the contribution HTML_Textboxes and inserted it in the index page of my site and it is currently taking up 100% width. How do I go about changing the width of the box and where do I find the code? I want it to be 85% This is the code from the catalog/includes/modules/text_box.php <?php /* $Id: text_box.php, V. 1.7 2004/05/11 Jim Keebaugh Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License This is a modified version of the original MS2 information.php by hpdl. */ ?> <!-- text_box //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => TABLE_HEADING_TEXT_BOX); new infoBoxHeading($info_box_contents, false, false); $html_file = DIR_WS_LANGUAGES . $language . '/html/' . basename($PHP_SELF,".php") . '.html'; $html = implode("", file($html_file)); $output = ereg_replace("(<!doctype([^>]+)>)|(<[/]?html>)|(<head>(.*)?</head>)|(<[/]?body([^>]+)?>)", '', $html); $info_box_contents = array(); $info_box_contents[] = array('text' => $output); new infoBox($info_box_contents); ?> <!-- text_box_eof //--> and this is the code from the snippet in the catalog/index.php file <tr> <td class="main"> <?php require(DIR_WS_MODULES . 'text_box.php'); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> I cannot find any place that would indicate a size so I am a bit stumped on this. Thanks for your help DylanO
germ Posted April 1, 2008 Posted April 1, 2008 This brute force attempt worked in Firefox (Webdeveloper addon): <td class="main"> <table width="85%" align="center"> <tr><td> <?php require(DIR_WS_MODULES . 'text_box.php');?> </td> </tr> <table> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted April 2, 2008 Posted April 2, 2008 It forced the text box to 85% and it looks perfect! What it has also done is taken the day/date line below and skewed it to the right both in Firefox, MSN and in IE7. I can live with it though. Maybe what I will do is increase the cell-padding of the text box to bring in the type face. I will get on it tomorrow morning and see what I can track down. Thanks Jim - as always great work and if you are looking at the site and seeing some positive improvements feel free to let me know! :-" DylanO
germ Posted April 2, 2008 Posted April 2, 2008 In the footer, changing this: <!-- footer //--> <table border="0" cellpadding="1" cellspacing="0" width="100%"> to <!-- footer //--> <table border="0" cellpadding="1" cellspacing="0" width="89%"> get's it back to at least a resemblence of normalcy. I don't critique anyone's site. Beauty is in the eye of the beholder. I focus on functionality. :lol: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted April 2, 2008 Posted April 2, 2008 I have made some changes and returned the box size back to normal and will leave this aspect of the site alone for a while. Thanks again for your input!
germ Posted April 3, 2008 Posted April 3, 2008 Well, I did make an error in the code I posted. This: <?php require(DIR_WS_MODULES . 'text_box.php');?> I replaced with: <table align="center" width="85%"> <tr><td> <?php require(DIR_WS_MODULES . 'text_box.php');?> </td></tr> </table> With this mod, I'm not seeing the "skew" we had last night. At least not in Firefox. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted April 5, 2008 Posted April 5, 2008 Well, I did make an error in the code I posted. This: <?php require(DIR_WS_MODULES . 'text_box.php');?> I replaced with: <table align="center" width="85%"> <tr><td> <?php require(DIR_WS_MODULES . 'text_box.php');?> </td></tr> </table> With this mod, I'm not seeing the "skew" we had last night. At least not in Firefox. I gave it a go Jim and you are right, there was no skew to the line but for future reference it also kicked the column_right over to the column_left which was likely my fault. But, since I had planned on leaving this aspect alone it was not an issue for me but might be for someone else along the line.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.