Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Aligning text next to logo...

Aligning text next to logo...

Locked

Views: 2,866

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
30 Dec 2007, 10:59 AM
#1
arkwright avatar

arkwright

Zen Follower

Join Date:
Oct 2007
Posts:
95
Plugin Contributions:
0

Aligning text next to logo...

Could someone please have a look at my home page and tell me how I format the text so it sits to the left of the manufacturers logo.

I have tried doing it with Zencarts 'define pages' html editor, but just can't get the text to sit next to the logo.

Any help would be much appreciated...

Arkie....

30 Dec 2007, 11:54 AM
#2
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Aligning text next to logo...

use "float: left" instead of "text-align: left"

30 Dec 2007, 12:33 PM
#3
arkwright avatar

arkwright

Zen Follower

Join Date:
Oct 2007
Posts:
95
Plugin Contributions:
0

Re: Aligning text next to logo...

Thanks for the reply...

I may have done it wrong, but changing 'text-align' to 'float' didn't bring the text alongside the image, it left the text where it was but just made it overlap with the 'monthly specials' box..

Arkie...

30 Dec 2007, 4:23 PM
#4
arkwright avatar

arkwright

Zen Follower

Join Date:
Oct 2007
Posts:
95
Plugin Contributions:
0

Re: Aligning text next to logo...

Still having problems....

I have now inserted the image using the following code as opposed to hosting the image off site via Zencarts HTML editor.

<?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'main page logos.jpg', 'Float On By The One Stop Hook & Float Shop');?>

This has put the image to the left above the text.

What do I need to change to make the image align right and the text align left next to the image?

Arkie....

30 Dec 2007, 6:13 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Aligning text next to logo...

#indexDefaultMainContent img {float: right;}

30 Dec 2007, 7:17 PM
#6
arkwright avatar

arkwright

Zen Follower

Join Date:
Oct 2007
Posts:
95
Plugin Contributions:
0

Re: Aligning text next to logo...

Thanks for the reply

Sorry for being a bit dumb, but not sure what you mean by

#indexDefaultMainContent img {float: right;}

Am I supposed to insert that code somewhere?

Thanks
Arkie...

30 Dec 2007, 7:20 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Aligning text next to logo...

Sorry, you would add that to your stylesheet.

It can go at the bottom of the file, or in with the other "Images" declarations as you like.

30 Dec 2007, 7:29 PM
#8
arkwright avatar

arkwright

Zen Follower

Join Date:
Oct 2007
Posts:
95
Plugin Contributions:
0

Re: Aligning text next to logo...

Thanks again for the quick reply...

I have inserted the code and it has moved the image to the right, but if you now look at my homepage, it overlaps with the 'monthly specials' box and is out of line with the text on the left....

Any ideas?

Arkie...

30 Dec 2007, 7:50 PM
#9
arkwright avatar

arkwright

Zen Follower

Join Date:
Oct 2007
Posts:
95
Plugin Contributions:
0

Re: Aligning text next to logo...

I've solved the problem by inserting breaks at the end of the text to push the 'monthly specials' box further down the page.

Is this an acceptable solution to the problem?

Arkie....

30 Dec 2007, 9:43 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Aligning text next to logo...

As long as you have a fixed width page so that wider screens don't make the text fit on fewer lines, you should be fine.

What might be more flexible and positive is to make just one break at the end of the text, like
<br class="clearBoth" />.
That will push the break and anything after it below the floated image.

31 Dec 2007, 7:23 AM
#11
arkwright avatar

arkwright

Zen Follower

Join Date:
Oct 2007
Posts:
95
Plugin Contributions:
0

Re: Aligning text next to logo...

Thanks gjh...

That worked great. Another piece of useful code I've leant today. That makes it about 6 bits of code I know now....:smartalec:

Arkie....