Guest maffs Posted December 11, 2005 Share Posted December 11, 2005 Hi there, Bit of a dumb question but how can i get the latest products to align centrally on the home page? When i float: center (index.tpl) i only get the products in a vertical line (not what i want). There must be a way but i think im missing something, i've even added a layer and tried to align that but to no joy!!! Can anyone help Thanks in advance Chris Quote Link to comment Share on other sites More sharing options...
markscarts Posted December 11, 2005 Share Posted December 11, 2005 Did you read the post about "READ THIS BEFORE POSTING"? Just curious, because I don't see #5 - name of skin or link to store. No matter - if you are using Killer, it has a variable width to fit browser window, I can't help you. If you are using Legend or Classic (fixed width), you can accomplish this by trial and error. Open includes/contents/index.inc.php Find where VAL_WIDTH is defined. This will be your thumbnail width setting + a number, probably 75 Increase or decrease that number until you have equal spacing all the way across. Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted December 22, 2005 Share Posted December 22, 2005 Basically you need to alter the: includes/content/index.inc.php skins/youskin/styleTemplates/content/index.tpl If you would give us more info we could help you but suggest you perform a search first ;) Quote Link to comment Share on other sites More sharing options...
Guest aikdo Posted December 22, 2005 Share Posted December 22, 2005 Im sure this isn't possible... I have tried many methods and as of yet cant make them centralised... divs work with float left or float right atributes, though float bottom also works... my best tip to you is just have an even number of products and if you do but the whole group is floating to one side add some padding to them... Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted December 22, 2005 Share Posted December 22, 2005 (edited) aikdo, checkout "margin: auto" It is possible to align a div centrally using "margin: auto" (although only the left and right margins need to be set to auto). However when you have multiple divs that you want side by side, they will have to be floated and so they can only be left or right aligned, but they can be all be placed within a larger div that is centrally aligned. Therefore, if you add an extra div around all of the individual latest product divs, you can set this extra div (lets call it a wrapper div) to have a width less than the available space (eg. width: 400px), and set its margin to auto (ie. margin: auto). Something like this should work, but I'm not a CSS pro so there may be more too it. Edit: But i'm not sure if it would work with a variable width page (ie. the Killer skin) Edited December 22, 2005 by estelle Quote Link to comment Share on other sites More sharing options...
Guest aikdo Posted December 22, 2005 Share Posted December 22, 2005 Awwww a CSS atribute i haven't heared of... Thanks Estelle im going rush around my clients shops now and add that to everything i can find Estelle's Our QUEEN Quote Link to comment Share on other sites More sharing options...
Guest Puppy Posted January 1, 2006 Share Posted January 1, 2006 I am using the killer skin, and was able to center the latest products by changing this line in: /{VAL_SKIN}/styleTemplates/content/index.tpl <div style="float: left; text-align: center; width: {VAL_WIDTH}px;"> to: <div style="float: left; text-align: center; width: {VAL_WIDTH}px; width: 140px; height: 125px;"> Basically you need to give the div a width and height value to position the thumbs according to your site design. Whilst on the topic, I'd like to thank markscarts for the LateProdFix. -Puppy http://www.coldandcuddly.com/ Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted January 1, 2006 Share Posted January 1, 2006 Im sure this isn't possible... I have tried many methods and as of yet cant make them centralised... divs work with float left or float right atributes, though float bottom also works... I wouldnt rush and jump in to conclusions of what is and what is not possible What you havent manage to do, doesnt mean that nobody else cant do it. I and many others have done it on a few sites :( Quote Link to comment Share on other sites More sharing options...
Guest aikdo Posted January 1, 2006 Share Posted January 1, 2006 I ment centering each individual div in that post which i thought was the question IE if you had rows of 3 divs but one row only had two for those two to centralise but i now realise that was not what was wanted... If anyone can tell me that they have found a way to centralise the Odd number of divs then great im always waiting for more knowlege but i my voyage through the Css atrabutes i cant see any way that doesn't involve a hack... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.