Post by Inspired » Thu Jan 07, 2010 12:52 am

I would like to "pull together" left column, right column and content by giving them a shared background.

I tried creating an extra div with background and put it in home.tpl between

<?php echo $header; ?>
<div id="pulltogether">
<?php echo $column_left; ?><?php echo $column_right; ?>

But that didn't work. Any help?

Newbie

Posts

Joined
Mon Jan 04, 2010 4:54 pm

Post by Qphoria » Thu Jan 07, 2010 1:05 am

you mean a "wrapper" ?

What you are doing should work. You will have to put the opening div tag in the header at the bottom, and the closing div tag in the footer at the top i believe

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Inspired » Thu Jan 07, 2010 3:30 am

I added the following div to the stylesheet

Code: Select all

#wrapper {
	background-image:url(../image/bg.png);	
	}
This to the very bottom of header.tpl

Code: Select all

<div id="wrapper">
and this to the very top of footer.tpl

Code: Select all

</div>

It didn't change a thing. Maybe I'm doing something wrong?

Newbie

Posts

Joined
Mon Jan 04, 2010 4:54 pm

Post by Qphoria » Thu Jan 07, 2010 4:13 am

need a link to check it

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fido-x » Thu Jan 07, 2010 3:39 pm

Put the following:-

Code: Select all

<div style="clear: both;">&nbsp;</div>
before the closing </div> you put in the footer.tpl file.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Inspired » Thu Jan 07, 2010 3:45 pm

I found out that the div itself is working. I can change width and stuff.

The problem is somewhere in the height but I can't figure it out. If I say that the height of wrapper is 300px for example, it shows the background for 300pxs. If I put 100% as height or auto, it doesn't show the background.

Newbie

Posts

Joined
Mon Jan 04, 2010 4:54 pm

Post by Qphoria » Thu Jan 07, 2010 8:49 pm

did you try what fido mentioned? that sounds like it might help

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Inspired » Thu Jan 07, 2010 11:20 pm

fido-x wrote:Put the following:-

Code: Select all

<div style="clear: both;">&nbsp;</div>
before the closing </div> you put in the footer.tpl file.
I tried it, but it doesn't fix my problem.

I think it's a div height problem of some sort like I explained in my previous post.

Newbie

Posts

Joined
Mon Jan 04, 2010 4:54 pm

Post by Qphoria » Fri Jan 08, 2010 5:50 am

well its a div height issue due to the float setting. Its called float drop. Adding that code that fido added will tell the ending div to clear all floats before closing.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fido-x » Fri Jan 08, 2010 12:19 pm

The background colour in the content div may be interfering with your image. Look for "#content .middle" in your stylesheet (around line 141 in the default) and change the line that reads "background: #FFFFFF;" to "background: transparent;" or "background: none;".

Do the same with the "box" class (.box .middle - line 168).

Might help.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by imaginetech » Fri Jan 08, 2010 2:07 pm

Set the div overflow attribute to hidden.

That will "stretch" the div to the height you want.

Image
www.opencartstore.com
Get OpenCart Templates and OpenCart Modules.


User avatar
Active Member

Posts

Joined
Fri Sep 04, 2009 12:25 pm
Location - Darwin, Australia

Post by Inspired » Fri Jan 08, 2010 6:41 pm

imaginetech wrote:Set the div overflow attribute to hidden.

That will "stretch" the div to the height you want.
Woohoo, it worked! Thank you very much :-)

Newbie

Posts

Joined
Mon Jan 04, 2010 4:54 pm
Who is online

Users browsing this forum: No registered users and 1 guest