Forums / General Questions / How to align text center?

How to align text center?

Locked

Views: 1,960

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
8 Mar 2007, 3:16 PM
#1
handcrafteduk avatar

handcrafteduk

Zen Follower

Join Date:
Jul 2006
Posts:
240
Plugin Contributions:
0

How to align text center?

Hi,

I've been trying to align the text in my short description to the center. nothing seems to be working though! In the stylesheet for my short descriptions I am typing:

.productShortDescription {
font-weight: bold;
text-align: center; }

It doesn't work though. I know I am in the right place though because if I insert {float: right} the short description text goes to the right of the page.

Any ideas of what code I can put in to get the text into the centre? An example from one of my pages is: http://www.handcrafteduk.com/africankifsmokingpipe-p-34.html

Thanks,

Gary :smile:

9 Mar 2007, 12:54 AM
#2
handcrafteduk avatar

handcrafteduk

Zen Follower

Join Date:
Jul 2006
Posts:
240
Plugin Contributions:
0

Re: How to align text center?

Ok, An update!

As trying to align the text wasn't working I have input this code:

.productShortDescription {
font-weight: bold;
margin: 160px;;
font-size: 1.2em;
}

It moves the text more or less into the center but it still isn't quite right. Any ideas on what I can change to get it EXACTLY into the center?

Thanks,

Gary

29 Mar 2007, 5:13 PM
#3
handcrafteduk avatar

handcrafteduk

Zen Follower

Join Date:
Jul 2006
Posts:
240
Plugin Contributions:
0

Re: How to align text center?

Hello,

I'm still stuck on this one. Anyone got any idea how to solve it?

Thanks,

Gary :smile:

16 Apr 2007, 6:34 PM
#4
handcrafteduk avatar

handcrafteduk

Zen Follower

Join Date:
Jul 2006
Posts:
240
Plugin Contributions:
0

Re: How to align text center?

Posting again in the hope that someone might help should i bump the thread!! :smile:

16 Apr 2007, 6:57 PM
#6
handcrafteduk avatar

handcrafteduk

Zen Follower

Join Date:
Jul 2006
Posts:
240
Plugin Contributions:
0

Re: How to align text center?

Hurrah, someone replied - thank you :D

It's not centered when i look in my explorer and mozilla browsers. For example, looking at: http://www.handcrafteduk.com/tibetanprayerbellanddorje-p-111.html you will see the line:

'Important item for practicing Buddhists. Made from brass' is to the left of the screen whilst the lines of text above and below it are centred.

16 Apr 2007, 7:17 PM
#7
nomadrip avatar

nomadrip

Zen Follower

Join Date:
Feb 2007
Location:
Calabasas, CA & St. Pete, FL
Posts:
87
Plugin Contributions:
0

Re: How to align text center?

HandcraftedUK:

Hurrah, someone replied - thank you :D

It's not centered when i look in my explorer and mozilla browsers. For example, looking at: http://www.handcrafteduk.com/tibetanprayerbellanddorje-p-111.html you will see the line:

'Important item for practicing Buddhists. Made from brass' is to the left of the screen whilst the lines of text above and below it are centred.

I don't know which file this is in, but look for "Product Short Description" in your files. It looks like it is labeled wrong on the end file. It's closed as Product name instead of Product short description (see red).

<!--bof Product Name-->
<h1 id="productName" class="productGeneral">Tibetan Prayer Bell and Dorje</h1>
<!--eof Product Name-->

<!--bof Product Short Description-->
<span class="productShortDescription">Important item for practicing Buddhists.  Made from brass.</span><!--eof Product Name-->
``` Dunno if that will fix it, but see if it does.

-James Starting from scratch!
Started out w/ZenCart 1.3.7 (No upgrades)
http://www.nomadicmoto.com/
Review my site here: http://www.zen-cart.com/forum/showthread.php?t=63630

16 Apr 2007, 8:28 PM
#8
handcrafteduk avatar

handcrafteduk

Zen Follower

Join Date:
Jul 2006
Posts:
240
Plugin Contributions:
0

Re: How to align text center?

HI,

Thanks for the second reply. That bit of code was so that, in the product listing display, the short descriptions would show as opposed to the standard descriptions that zencart uses. It would affect the layout of the text.

Thanks