Evolve Design Posted August 4, 2010 Posted August 4, 2010 Hi all you gurus out there! I'm really scratching my head on this one... Through a fairly strenuous process, I have converted much of my site to CSS as opposed to tables (or, at the very least, using CSS to define the location of said tables). All is well, except for one glaring issue. My subpages (eg. Product Info that appears after you click a product) do not seem to respect the positioning commands given, and the content starts flush with the top of the page. Apart from being far too high, the layout is just fine. I'm hoping someone can give me a bit of advice on where to look for the file(s) that determine the layout of these subpages...or let me know what I'm doing wrong! Thanks very much Peter Rolih
artful Posted August 4, 2010 Posted August 4, 2010 Hi all you gurus out there! I'm really scratching my head on this one... Through a fairly strenuous process, I have converted much of my site to CSS as opposed to tables (or, at the very least, using CSS to define the location of said tables). All is well, except for one glaring issue. My subpages (eg. Product Info that appears after you click a product) do not seem to respect the positioning commands given, and the content starts flush with the top of the page. Apart from being far too high, the layout is just fine. I'm hoping someone can give me a bit of advice on where to look for the file(s) that determine the layout of these subpages...or let me know what I'm doing wrong! Thanks very much Peter Rolih Hello Peter, Are you trying to define with stylesheet.css or another method? If it is with the stylesheet.css file you keep the tables and every file calling the style sheet must have the right references defining the breadcrumb trail and widths and in your /includes/application_top you have to put a // before the line setting the left column width and define your other crteria at the top of the file as in : /* $Id: application_top.php 1833 2008-01-30 22:03:30Z hpdl $ added HTSEO v.3.1.8, Down for Maintenance, Allprods, OscThumb 1.1, Options Types 2.2 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2008 osCommerce Released under the GNU General Public License */ define('MAX_DESCR_1','60'); define('MAX_DESCR_2','794'); define('MAX_DESCR_BESTS','18'); define('MAX_DESCR_REVIEWS','105'); // customization for the design layout define('MAIN_TABLE', 'main_table'); // class name main table define('BOX_WIDTH_TD_LEFT', 'box_width_td_left'); // how wide the boxes should be in pixels (default: 125) define('BOX_WIDTH_TD_RIGHT', 'box_width_td_right'); // how wide the boxes should be in pixels (default: 125) define('CONTENT_WIDTH_TD', 'content_width_td'); // how wide the main content should be in pixels define('BOX_WIDTH_LEFT', 'box_width_left'); // how wide the boxes should be in pixels (default: 125) define('BOX_WIDTH_RIGHT', 'box_width_right'); // how wide the boxes should be in pixels (default: 125) I suppose that you are building it locally so we can't really look at the files on line to find the error. Generally the image error you are showing comes from the failure to define the content width (between the 2 columns) and the breadcrumb trail in relation to the header. Barbara
npn2531 Posted August 4, 2010 Posted August 4, 2010 in product_info.php find: <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> and change topmargin to something other than zero. Another solution would be to remove the margin parameters from every page and set the body margin in the stylesheet. Part of the problem with using the stylesheet to position tables is that many of the tables are nested, have in-line parameters (values added to each table on each page within each table tag) and also do not have class designations. To use the stylesheet.css to position tables with much flexibility, you are going to have to go through the entire shop and at a minimum add a class designation to each table. For example change stuff like <table border="0" width="100%" cellspacing="3" cellpadding="3"> to <table class="myclass"> with a cooresponding entry in the stylesheet, .myclass{} Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120
Evolve Design Posted August 6, 2010 Author Posted August 6, 2010 Thank you both so much! I tried the suggestion by artful first, but it did not appear to affect anything...at least, nothing immediately obvious. But then I gave npn2531's suggestion a crack. I had already defined the body margins in my css...but then, exactly as indicated, I had to give the tables some instructions. Once this was done, all became good in my world! Haha.. once more, thanks very much for your kind advice :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.