X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Align image to bottom of leftbar (https://forum.x-cart.com/showthread.php?t=63942)

AMMoyer 06-14-2012 09:16 AM

Align image to bottom of leftbar
 
I'm trying to get an image to align to the bottom of the left bar. However, since the leftbar div doesn't extend vertically if the "center div" box is longer I can't seem to make it happen. I think I need to add a child div to the leftbar div that uses absolute position to locate the image at the bottom. How do I do this if the center div is longer vertically?

gb2world 06-14-2012 03:37 PM

Re: Align image to bottom of leftbar
 
I've not tried this - but what if you created a new div, and placed that div inside the #center div, but after #center-main div?

Since it is inside #center div, you can use its margin settings to move it into the area under the left column. You can give it a negative margin-top to move it up above where the center-main content ends.

This would only work if you are sure the left column content will not be long enough to interfere with it. If that is not the case - you can google "css make a div fill the available height" to look for techniques that you should be able to adapt to the #left-bar div.

---

AMMoyer 06-15-2012 08:53 AM

Re: Align image to bottom of leftbar
 
Thanks for the reply. I tried both methods you suggested, but there are cases where the left-bar div dictates the height of the page and others where center-main controls height. Not sure there's an easy solution without resorting to writing a script.

I'll put this on the "Maybe if I have time list".

gb2world 06-15-2012 12:05 PM

Re: Align image to bottom of leftbar
 
It would be a "quick and dirty" hack, but if you know which pages have short #center-main, you can use smarty if-than statements, perhaps based on $main, to display the new div in the #left-bar or under #center-main.

---


All times are GMT -8. The time now is 01:23 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.