CSS/HTML text / background alignment problem

CSS/HTML text background issue
I am using HTML and CSS to produce a web page which has a line of text at a fixed position in the web page and the text should have a specific background colour.
The problem is that the text is not centered in the background but is aligned to the top of the background box.
How can I code the CSS style sheet to correct this ?
I attach an image of the HTML and the web display. The CSS file is as follows:

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
body {
	line-height: 1;
ol, ul {
	list-style: none;
blockquote, q {
	quotes: none;
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
table {
	border-collapse: collapse;
	border-spacing: 0;

.red {
	background-color:#FF0000 ; width:200px; position:absolute; top:100px; height:50px; text-align:center;  vertical-align:middle;
.lime {
	 background-color:#66FF33 width:200px; position:absolute; top:100px;height:50px;text-align:center;


Open in new window

Web display plus HTML
Roger AlcindorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Roger AlcindorAuthor Commented:
changed the following CSS code which fixed the problem :
.red {
      background-color:#FF0000 ; width:200px; position:absolute; top:100px; height:50px; text-align:center;  vertical-align:middle; padding-top 20px;
.red {
      background-color:#FF0000 ; width:200px; position:absolute; top:100px; height:50px; text-align:center;  vertical-align:middle;

I wish to close the question now but the new web page layout doen't offer this ??

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Roger AlcindorAuthor Commented:
how do I award myself with points or otherwise close the question ?
Chinmay PatelChief Technical NinjaCommented:
You can assign 0 points to self and close the question.
Roger AlcindorAuthor Commented:
Problem solved as per my prior comment
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.