html - css sheet not effecting php echo -


i using php check form. if content not filled in php echo error message. want text effected style sheet. not. css effects rest of page, not error text. tried adding span , class in echo , tried adding span , class html , echo text. no effect.

the html

<meta charset="utf-8"> <link rel="stylesheet" href="run.css" type="text/css"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> 

the php

<span class="errormsg2">  <?php     if(isset($notset)){         echo $notset;     } ?> </span> 

and css

.pushme:hover{     background-color: #eb5300;     color: black;     text-shadow: none; }  .errormsg2{     text-align: center;     color: red;     font-weight: bold; } 

the php example provided attempt put span , class html , echo out text content.

i believe problem file extension should filename.php instead of filename.html , because php server side language have run code in localhost mode see change. if try run php code in filename.html browser comment your php code.

// filename.php file, work  <!doctype html>  <html lang="en">  <head>      <meta charset="utf-8">      <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">      <style>          .errormsg2{              text-align: center;              color: red;              font-weight: bold;          }      </style>  </head>  <body>      <span class="errormsg2">          <?php              $notset = "test";              if(isset($notset)){                  echo $notset;              }          ?>      </span>  </body>  </html>


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -