Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Align image to bottom of leftbar

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-14-2012, 09:16 AM
 
AMMoyer AMMoyer is offline
 

Senior Member
  
Join Date: Nov 2008
Posts: 150
 

Default 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?
__________________
Adam
X-Cart Gold 4.4.5 - Live
X-Cart Gold 4.1.11 - Retired
X-Payments 1.0.4
CDSEO Pro
EWD Hosting
Reply With Quote
  #2  
Old 06-14-2012, 03:37 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default 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.

---
__________________
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)
Reply With Quote
  #3  
Old 06-15-2012, 08:53 AM
 
AMMoyer AMMoyer is offline
 

Senior Member
  
Join Date: Nov 2008
Posts: 150
 

Default 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".
__________________
Adam
X-Cart Gold 4.4.5 - Live
X-Cart Gold 4.1.11 - Retired
X-Payments 1.0.4
CDSEO Pro
EWD Hosting
Reply With Quote
  #4  
Old 06-15-2012, 12:05 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default 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.

---
__________________
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)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:43 PM.

   

 
X-Cart forums © 2001-2020