title: CSS Style in JSP
body: <p>I have a JAVA EE app. deployed in a Tomcat 7 where I have this JSP and I want to apply a style to the footer to center the text, so I define the style in the JSP to be applied in the footer DIV</p>
  
  <pre><code>&lt;%@ page import="com.telefonica.movistar.vo.UserVO" %&gt;
  &lt;%@ page import="com.telefonica.movistar.dao.MonitorProcessDAO" %&gt;
  &lt;%@ page import="com.telefonica.movistar.vo.MonitorProcessVO" %&gt;
  &lt;%@ page import="java.util.ArrayList" %&gt;
  
  &lt;style&gt;
  .layout-footer {
      border-width: 1px 0;
      justify-content: center
  }
  &lt;/style&gt;
  
  &lt;%
    MonitorProcessDAO dao = new MonitorProcessDAO();
  
    String action = request.getParameter("action");
    String reference = request.getParameter("reference");
  
    if ("keepalive".equals(action)) {
      dao.keepAlive(reference);
    } else
    if ("setmetrics".equals(action)) {
      String metric1 = request.getParameter("metric1");
      String metric2 = request.getParameter("metric2");
      String metric3 = request.getParameter("metric3");
      dao.setMetrics(reference, metric1, metric2, metric3);
    } else
    if ("reporterror".equals(action)) {
        String message = request.getParameter("message");
      dao.reportError(reference, message);
    } else {
  %&gt;
  &lt;%@ page contentType="text/html" pageEncoding="windows-1252"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" href="../mobile/mobileWS.css" media="screen" /&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252" name="MobileOptimized"&gt;
      &lt;title&gt;Process Monitoring&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;p&gt;&lt;b&gt;Now:&lt;/b&gt; &lt;%=(new java.util.Date())%&gt;&lt;/p&gt;
      &lt;table&gt;
      &lt;tr bgcolor="#E0E0E0"&gt;
        &lt;td&gt;&lt;b&gt;Reference&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;&lt;b&gt;KeepaliveDate&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;&lt;b&gt;Metric1&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;&lt;b&gt;Metric2&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;&lt;b&gt;Metric3&lt;/b&gt;&lt;/td&gt;
        &lt;td width="100%"&gt;&amp;nbsp;&lt;/td&gt;
      &lt;/tr&gt;
  
  &lt;%
    ArrayList list = dao.list(null);
    for (int i=0;(list!=null)&amp;&amp;(i&lt;list.size());i++) {
      MonitorProcessVO vo = (MonitorProcessVO)list.get(i);
  
      String bgcolor= ((i%2)!=0) ? "#F0F0F0" : "#FFFFFF";
  %&gt;
      &lt;tr bgcolor="&lt;%=bgcolor%&gt;"&gt;
        &lt;td nowrap&gt;&lt;%=vo.getReference()%&gt;&lt;/td&gt;
        &lt;td nowrap&gt;&lt;%=vo.getKeepaliveDate()%&gt;&lt;/td&gt;
        &lt;td nowrap&gt;&lt;%=vo.getMetric1Value()%&gt;&lt;/td&gt;
        &lt;td nowrap&gt;&lt;%=vo.getMetric2Value()%&gt;&lt;/td&gt;
        &lt;td nowrap&gt;&lt;%=vo.getMetric3Value()%&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;%
    }
  %&gt;    
      &lt;/table&gt;
      &lt;br/&gt;
      &lt;table&gt;
      &lt;tr bgcolor="#E0E0E0"&gt;
        &lt;td&gt;&lt;b&gt;Reference&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;&lt;b&gt;ErrorDate&lt;/b&gt;&lt;/td&gt;
        &lt;td width="100%"&gt;&lt;b&gt;Message&lt;/b&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
  &lt;%
    list = dao.listError(null);
    for (int i=0;(list!=null)&amp;&amp;(i&lt;list.size());i++) {
      MonitorProcessVO vo = (MonitorProcessVO)list.get(i);
  
      String bgcolor= ((i%2)!=0) ? "#F0F0F0" : "#FFFFFF";
  %&gt;
      &lt;tr bgcolor="&lt;%=bgcolor%&gt;"&gt;
        &lt;td nowrap&gt;&lt;%=vo.getReference()%&gt;&lt;/td&gt;
        &lt;td nowrap&gt;&lt;%=vo.getErrorDate()%&gt;&lt;/td&gt;
        &lt;td nowrap&gt;&lt;%=vo.getErrorMessage()%&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;%
    }
  %&gt;    
      &lt;/table&gt;
      &lt;br/&gt;
      &lt;table&gt;
      &lt;tr bgcolor="#E0E0E0"&gt;
        &lt;td width="100%"&gt;&lt;b&gt;Daily Reports&lt;/b&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor="#F0F0F0"&gt;
        &lt;td nowrap&gt;&lt;a href="../reports/generic_html.jsp?guiUserId=10191&amp;reportId=973&amp;view=V_RPT_SAV_TELEFONO_STATUS"&gt;Aggregation Logs&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor="#FFFFFF"&gt;
        &lt;td nowrap&gt;&lt;a href="../reports/generic_html.jsp?guiUserId=191001&amp;reportId=83&amp;view=V_ABONADOS_MONITORING_DAY"&gt;Aggregation Monitoring&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/table&gt;
  
      &lt;div class="layout-footer" style="align"&gt;
          &lt;br/&gt;&lt;br/&gt;
          Build 1.0.0  -  (07/11/2017)  &amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp; &amp;copy; Telefonica 2017
      &lt;/div&gt;
  
  
    &lt;/body&gt;
  &lt;/html&gt;
  &lt;% 
    } 
  %&gt;
  </code></pre>
  
  <p>but the footer does not apply the style and I see the text align to the left for all the browsersL IE, chrome and Firefox</p>