Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How do I "Vertical Align" the message text?

How do I "Vertical Align" the message text?

Locked

Views: 1,122

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
20 May 2007, 7:48 PM
#1
mcanes avatar

mcanes

Zen Follower

Join Date:
May 2007
Posts:
210
Plugin Contributions:
0

How do I "Vertical Align" the message text?

Ok, call me picky but I want to have the text in the attached image appear centered vertically in the box, so it is inline with the middle of the success image.

Can someone please tell me how to go about doing this? I am assuming it is in the style sheet, but I tried the code below and it did not work.

.messageStackSuccess {
 background-color: #FFFFCC;
 color: #000000;
 vertical-align: middle;
 }

Thanks again for the help.

20 May 2007, 9:27 PM
#2
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: How do I "Vertical Align" the message text?

Nice idea :thumbsup:

.messageStackSuccess img, .messageStackCaution img{
vertical-align: middle;
}
```As you see I added one other class with the same purpose. It would be even nicer to add it to all messageStack classes, probably.

(actually this shows what multiple classes really are good for, all messageStack messages should have a class "messageStack", and each different kind it's own secondary  class like "messageStackCaution" and "messageStackSuccess" etc).
20 May 2007, 10:03 PM
#3
mcanes avatar

mcanes

Zen Follower

Join Date:
May 2007
Posts:
210
Plugin Contributions:
0

Re: How do I "Vertical Align" the message text?

Thanks again... Your suggestion worked great. Here is the after shot. Most people wouldn't care, but I figure I am starting from scratch so I should take the extra time and do it how I want it.

Thanks again! :clap:

20 May 2007, 10:14 PM
#4
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: How do I "Vertical Align" the message text?

I certainly agree it looks much better. And I am using the stack whenever a product has been added to the cart (which is an important moment, I guess ;-) ), so I am glad your question reminded me to fix it!

And I'm glad it works for you too :-)