0

I have a problem that is driving me nuts!

I have made plenty of Joomla templates before and I have rarely encountered this problem but lately I've seen it happen twice with some sites I've worked with.

Basically I wrote this template for Joomla and all is well... no real issues, until now.

Here is the site: The BOAT Diet

Here is the "Buy Now!" page: Buy Now Page

Yes... um the site is not my idea, just giving the client what they want... anyways...

The footer at the bottom is a sticky footer (or it is suppose to be) and it does indeed work fine and "sticks" to the bottom of the page. However for some reason if anyone clicks on "Buy Now!" at the bottom of any page (it should be on all pages) the footer is NOT sticky. Basically the "Buy Now!" button is using the RS Membership component for Joomla and that's what is generating the page you get after you click on the "Buy Now!" button (the first one).

What is happening in the code is this:

The "footer" div is NOT suppose to be inside the div with the class "gridContainer clearfix"... it needs to be just under it. In the template, it IS just under it... and all the pages work fine except THIS one. Why does this one not have a sticky footer? Because the div location is CHANGING from outside the "gridContainer" to inside it!!! Certainly first thought that popped up in my head is "WHAT?!??! how the?"... it certainly makes no sense. Here is a basic "example" of what I mean. Please check the actual site for more details because I can't just list the whole template code in the post.

How it SHOULD be (and usually is):

<div class="gridContainer">
<div id="header">header content here</div>
<div id="content">main content here</div>
</div>
<div id="footer">footer content here</div>

How it ends up on the "Buy Now!" page:

<div class="gridContainer">
<div id="header">header content here</div>
<div id="content">main content here</div>
<div id="footer">footer content here</div>
</div>

How exactly can a Joomla component change the structure of a template?? That makes NO sense. Remember, it is a template. All the other pages using the template work. There is no change in the template file from those pages (that work) vs the "buy now!" page.

TCD Factory
  • 2,344
  • 2
  • 15
  • 12

2 Answers2

0

It seems that you put your closing div (gridContainer) in wrong condition which is not actually rendering in case of buy page. Div tag is not balanced in buy page, that's why footer is not sticky and wrapped inside the parent div.

Rashid
  • 135
  • 1
  • 8
  • What exactly do you mean "wrong condition"? I've check all my div's and there is an opening and closing tag for each one. Nothing is missing in those terms. Not only that but it's moving it from being a child of the tag to being a child of the
    tag. That makes no sense providing all the open and closing tags are there.
    – TCD Factory Jul 25 '13 at 06:12
  • Besides, its the same template as on all the other pages.. and those work. So far as I can tell it MUST be something the Joomla component php is doing to the template unintentionally. What I have NO clue. – TCD Factory Jul 25 '13 at 06:13
  • Just check the number of opening and closing div tags in your buy page. – Rashid Jul 25 '13 at 07:15
  • If it is any different from the other pages, it wasn't something I did, but the Joomla component. The template should definitely be producing the same semantic/valid structure as every other page. – TCD Factory Jul 25 '13 at 08:25
  • I just checked it for the 4th time, I see no missing open or closing div tags, not even on the "buy" page. – TCD Factory Jul 25 '13 at 08:27
  • Most likely it's an issue in the component where they have an unclosed div or have it in a funny place. You should look at their layout files and find the one for this, then override it in your template so you have the proper location of the . – Elin Jul 25 '13 at 12:58
  • Please check the module/component used on buy page. that module seems to be adding a
    tag but not closing, that's why on buy page there are 47 opening Div but only 46 closing Div. Add closing div to the module or remove extra opening div from the module. Or share the module name you are using so that i can have a look for the issue.
    – Rashid Jul 26 '13 at 09:22
0

Taking into consideration that you say that there are no open divs in the Buy Now page, and the fact that this is the only page causing this problem, I would suggest working around it to get this over with.

Your actual goal is to make the footer stay at the bottom, right?
Maybe you can consider adding a min-height: 100px; to the #rsm_rsmembership_container element. It worked when I tried on the fly with Firefox.

P.S.: A late response, but I can see the problem was still there.

mavrosxristoforos
  • 3,573
  • 2
  • 25
  • 40