| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Right border not displaying on subcategory image | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() For some reason, the right border on all of my subcategory images isn't displaying.
I think it's something to do with the code which decides the maximum width of the subcategory image. I added this style to altskin.css, line 934: .subcategories img { border: 1px solid black; } No matter how large I make the border, it won't display the right border! The width of the image, including its border, is always 124px, but I've set it to be 125px in General Settings, Appearance Options. I then tried setting the width to 124px, and it still displayed at 124px, but still without the right border. Then I tried setting it to 123px, but it still displayed at 123px, but still without the right border. I then tried setting it to 150px, but it displayed at 124px, still without the right border! I presume it is getting the width from this part of subcategories_t.tpl: Code:
Does anybody have any ideas? You can view it on the site I am customising: http://www.mrdtrading.co.uk/store/home.php?shopkey=martin then go to: http://www.mrdtrading.co.uk/store/home.php?cat=3
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#2
|
|||||||
|
|||||||
![]() Max width is image + effects.
Since your images are 124px and you want a 1px border on both sides, thats 2px so you need a max of 126px. This can be fixed if you know where to change the subcategories span class. What it should be: Code:
Edit: The code will be likely found inside a {foreach} statement which produces each category. |
|||||||
#3
|
|||||||
|
|||||||
![]() Hi Tal, I should have added this piece of code, which is just before the previous piece of code I posted, from subcategories_t.tpl:
Code:
I still don't know what to do to fix it. I tried changing the 'maximum thumbnail width' in General Settings, Appearance Options, to 126px, but still the same problem occurs - and it displays only a 124px wide image, including the left hand border.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#4
|
|||||||
|
|||||||
![]() You can try a temp fix by changing
Code:
Code:
|
|||||||
|
#5
|
|||||||
|
|||||||
![]() Many thanks Tal, that's fixed it! Much appreciated.
I would still like to find out why it happened in the first place, these things bug me until I work out why they are happening!
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#6
|
|||||||
|
|||||||
![]() Quote:
Same, which is why I'll be looking more into it soon ![]() The setting for that is somewhere and using hacks like the one I just gave isn't how to go about it. That's just to hold you over until the real issue is found. |
|||||||
#7
|
|||||||||
|
|||||||||
![]() You might consider it a minor bug if you are harsh? To account for it, QT would need to know that you are going to add a border, and how wide it will be, and account for it. They are resizing the image based on the admin setting, then setting the css for the container based on the same setting, so you can't fix it without another variable. (The administration setting does not know that you are going to add a border, and does not consider it. Might be easier for them to add an option to add a border in the administration, or just add the 2px that you did just in case someone does this.)
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
|
#8
|
|||||||
|
|||||||
![]() Thanks for explaining that, gb2world, now I understand it properly.
So, for my situation, Tal's solution is the way to go. It still allows me to change the max width size in Appearance Settings, and have a 1px border. Thanks guys.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#9
|
|||||||||
|
|||||||||
![]() In include/categories.php check this if
if (!empty($subcategories)) { and then near the bottom $smarty->assign("subcat_div_width", $subcat_div_width); $smarty->assign("subcat_div_height", $subcat_div_height + 70); $smarty->assign("subcat_img_height", $subcat_div_height); $smarty->assign("subcategories", $subcategories); I still don't know why QT decided to hard code it like this
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#10
|
|||||||
|
|||||||
![]() In the main product page, I can add a border to the style
.product-details img which is on line 2516 of main.css, and the border displays correctly. But isn't that element getting its size from 'Maximum product image width' in Appearance Options? So my question is, why does the problem occur with the thumbnail image, but not the product image?
__________________
X-Cart Gold Version 4.3.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|