Solved

Centering An Error Message

Posted on 2015-01-18
3
94 Views
Last Modified: 2015-01-19
I have an error message that pops up.  However, I can't figure out how to center it.

if(trim($name) == '') {
			$error = '<div class="error_message">Attention! You must enter your name.</div>';
		} else if(trim($email) == '') {
			$error = '<div class="error_message">Attention! Please enter a valid email address.</div>';

		} else if(!isEmail($email)) {
			$error = '<div class="error_message">Attention! You have enter an invalid e-mail address, try again.</div>';
		
		} else if(trim($comments) == '') {
			$error = '<div class="error_message">Attention! Please enter a comment.</div>';
		
		} else if(trim($verify) == '') {
			$error = '<div class="error_message">Attention! Please enter the verification number.</div>';
		
		} else if(trim($verify) != '4') {
			$error = '<div class="error_message">Attention! The verification number you entered is incorrect.</div>';
		}

		if($error == '') {

			if(get_magic_quotes_gpc()) {
				$comments = stripslashes($comments);
			}

Open in new window


The Link.
http://davidschure.com/hello.php

I can't find "error_message" class either to make the text red.
0
Comment
Question by:DS928
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
bigeven2002 earned 500 total points
ID: 40556896
Hello,
From the looks of the source on the site, the error_message class doesn't exist.  Try adding it in the styles.css or nav_styles.css file.
div.error_message {
text-align:center;
color:red;
}

Open in new window

0
 

Author Closing Comment

by:DS928
ID: 40557028
Thank you.  Worked great!
0
 
LVL 17

Expert Comment

by:bigeven2002
ID: 40557291
Glad I could help!
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question