Forums / Templates, Stylesheets, Page Layout / adding images to the bottom of the front page..

adding images to the bottom of the front page..

Locked

Started by mohinder on 20 Apr 2007, 5:38 PM · Views: 1,621

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
20 Apr 2007, 5:38 PM
#1
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

adding images to the bottom of the front page..

http://wishgiving.com/index.php is my site

i would like to add images on the left and right of the FEATURED product, how can i do this? which file do i edit? thanks in advance :)

21 Apr 2007, 2:47 AM
#2
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Re: adding images to the bottom of the front page..

Keep in mind, this method will not work quite right if you have more than 1 featured product at a time.

First you need to shrink the size of the Featured Product box.

Add the following to your stylesheet.

#indexDefault #featuredProducts {
width: 33%;
margin-left:auto;
margin-right:auto;
}

This will give you the space you need on both sides of the Featured Product box.

You can add whatever content you like in the
/includes/templates/your_template/templates/tpl_index_default.php

Look around line 47 for the code that calls the featured product module.
You can add a new DIV before and after this code in order to add pictures to the left and right.

If you need any more help, let me know.

21 Apr 2007, 7:39 AM
#3
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

Re: adding images to the bottom of the front page..

thanks! works just ifne
as you can see, i implemented it:

http://wishgiving.com/index.php

however, i want to put another image on the right..

is there any way i can align two images, one to the left and one to the right?

21 Apr 2007, 1:51 PM
#4
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Re: adding images to the bottom of the front page..

You should remove the <h1> tag from your image.

Replace your code:

<h1 id="indexDefaultHeading"><a href="index.php?main_page=index&cPath=2_97">
		  <img src="images/mother.jpg" /></h1>

With

<div class="left"> 
   <a href="index.php?main_page=index&cPath=2_97">
   <img src="images/mother.jpg" /></a>
</div>
<div class="forward">
   <a href="Right Link">
   <img src="Path to Right Image" /></a>
</div>

Do not forget the </a> tag. You left it out of your original code.

Then add
.left {
float:left;
}

to your stylesheet.

That will give you 2 images above the featured product. You can remove the previous style that I put in my first post if you want the featured products to expand to 100% width again.

21 Apr 2007, 5:55 PM
#5
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

Re: adding images to the bottom of the front page..

shows up weird..

is it because my images are too wide?

21 Apr 2007, 6:18 PM
#6
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Re: adding images to the bottom of the front page..

It doesn't look like you added the .left class definition to your stylesheet.

.left {
float:left;
}

You may also want to add a <br class="clearBoth" /> after the 2nd image.

I'm also not sure why the 2 div's that you are adding are showing up within the <h1 id="indexDefaultHeading"> tag. They should be inserted after the </h1>

You also have to make sure the images will fit next to one another, or else the 2nd one will wrap to the next line.

21 Apr 2007, 9:09 PM
#7
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

Re: adding images to the bottom of the front page..

i tried those changes- still no change :/

i'm not sure if i have the CSS right..

#indexDefault #featuredProducts {
width: 33%;
margin-left:auto;
margin-right:auto;
.left {
float:left;
}

also, where can i edit the title of all the pages?

22 Apr 2007, 12:33 PM
#8
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Re: adding images to the bottom of the front page..

You still have the h1 tag in your code, and there is an extra <div class="left">

Remove this from your code.

<h1 id="indexDefaultHeading"><div class="left">
22 Apr 2007, 5:49 PM
#9
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

Re: adding images to the bottom of the front page..

thanks!! works great :)