Main Wrapper height

General questions pertaining to how certain issues can be resolved
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

Main Wrapper height

Postby mbenatar » 14 Mar 2012, 14:21

Hi Again,
How do I make the size/height of my main wrapper the same as my right sidebar widgets?
http://www.thecrwn.org

Thank you,
Marten
mbenatar
 
Posts: 34
Joined: 05 Oct 2011, 21:02

Re: Main Wrapper height

Postby Colin » 14 Mar 2012, 14:40

give this a try

Code: Select all
#post-61 .post{height:630px;}


This will only work providing nothing changes on your sidebar and the text in this page does not exceed 630px.
Colin
 
Posts: 3797
Joined: 27 Oct 2009, 10:46

Re: Main Wrapper height

Postby mbenatar » 14 Mar 2012, 14:51

Hi,
Very good! That worked just fine.

Thank you,
Marten
mbenatar
 
Posts: 34
Joined: 05 Oct 2011, 21:02

Re: Main Wrapper height

Postby mbenatar » 14 Mar 2012, 21:37

Hi Colin

This will only work providing nothing changes on your sidebar and the text in this page does not exceed 630px.

Can I then just increase the pixels to compensate for the difference, or do I need another approach?
mbenatar
 
Posts: 34
Joined: 05 Oct 2011, 21:02

Re: Main Wrapper height

Postby Colin » 15 Mar 2012, 00:47

Yes just change the pixel number to suit your changes.
Colin
 
Posts: 3797
Joined: 27 Oct 2009, 10:46

Re: Main Wrapper height

Postby drake » 15 Mar 2012, 01:25

For an automated solution can add next code at Suffusion Options -> Backend -> Custom Includes -> Custom Footer Javascript:
Code: Select all
var ddequalcolumns=new Object()
ddequalcolumns.columnswatch=["sidebar-shell-1","sidebar-shell-2","main-col"]
ddequalcolumns.setHeights=function(reset){var tallest=0
var resetit=(typeof reset=="string")?true:false
for(var i=0;i<this.columnswatch.length;i++){if(document.getElementById(this.columnswatch[i])!=null){if(resetit)
document.getElementById(this.columnswatch[i]).style.height="auto"
if(document.getElementById(this.columnswatch[i]).offsetHeight>tallest)
tallest=document.getElementById(this.columnswatch[i]).offsetHeight}}
if(tallest>0){for(var i=0;i<this.columnswatch.length;i++){if(document.getElementById(this.columnswatch[i])!=null)
document.getElementById(this.columnswatch[i]).style.height=tallest+"px"}}}
ddequalcolumns.resetHeights=function(){this.setHeights("reset")}
ddequalcolumns.dotask=function(target,functionref,tasktype){var tasktype=(window.addEventListener)?tasktype:"on"+tasktype
if(target.addEventListener)
target.addEventListener(tasktype,functionref,false)
else if(target.attachEvent)
target.attachEvent(tasktype,functionref)}
ddequalcolumns.dotask(window,function(){ddequalcolumns.setHeights()},"load")


It is the original code from old WP Equal Columns plugin by Anthony Acosta, adapted for Suffusion markup. Also, the original plugin load the javascript in header and I think that is better to be loaded in footer for avoid negative impact to loading page speed.

After installing the script clear your cache and reload the page with Ctrl-F5 (Shift-F5 for Chrome) for several times, sometimes the changes aren't visible immediately. Also, if seems to not have the desired effect, change in code main-col with content and see if works in your case.

One site where I use that technique: http://www.bhzn.nl/.
drake
 
Posts: 5559
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Main Wrapper height

Postby mbenatar » 15 Mar 2012, 23:10

Thank you, I'll try the automated code when I make anymore changes.

Marten
mbenatar
 
Posts: 34
Joined: 05 Oct 2011, 21:02


Return to Support Requests

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 11 guests