0
我有一个jsp和一些jspf,我想要短,长的中期字段以及标题右对齐,但它不工作,只要我删除width属性 从我的风格开始对齐开始工作。虽然样式在其中一个包含的 jsp中工作,但不工作包含所有其他jspf和jsp的jsp。右对齐属性不起作用,同时给宽度tds
在jsp其包括其它JSPF和一个jsp是一样的东西------
<html>
<head>
<script>
</script>
</head>
<body class="dashboard">
<html-el:form action="${form.formAction}">
<div id="scrollHeader">
<html-el:hidden property="selectedForecastUnitOID"/>
<html-el:hidden property="selectedFactoryOID"/>
<%@ include file="ViewInputHeader.jspf"%>
<%@ include file="Error.jspf"%>
</div>
<div id="scrollBody">
<!-- **** BEGIN MESSAGE AREA **** -->
<table border="0" cellspacing="0" cellpadding="0">
</table>
<!-- NOTE: expand/collapse functionality needs to be added to this screen. Tables were used to allow the columns to align.
This may not be the best approach for the actual implementation.
-->
<table class="dashboard">
<COLGROUP class="dashRowLabel" span="1" />
<COLGROUP class="dashStep1" span="1" />
<COLGROUP class="dashStep2" span="3" />
<COLGROUP class="dashStep3" span="4" />
<COLGROUP class="dashStep4" span="4" />
<COLGROUP class="dashStep5" span="1" />
<thead>
<tr class="stepRow">
<th> </th>
<th>${PAGE_TRANSLATION_KEYS['STEP1']}</th>
<th colspan="3">${PAGE_TRANSLATION_KEYS['STEP2']}</th>
<th colspan="4">${PAGE_TRANSLATION_KEYS['STEP3']}</th>
</tr>
<TR class="stepLabel">
<th rowspan=2 class="headerLineName"></th>
<th rowspan=2class="stepOne">${PAGE_TRANSLATION_KEYS'ABBR_COE']}</th>
<th rowspan=2 class="stepTwo">${PAGE_TRANSLATION_KEYS['ABBR_MKT']}</th>
<th rowspan=2 class="stepTwo">${PAGE_TRANSLATION_KEYS['ABBR_PDC']}</th>
<th rowspan=2 class="stepTwo">${PAGE_TRANSLATION_KEYS['ABBR_SPO']}</th>
<th rowspan=2 class="stepOne">${PAGE_TRANSLATION_KEYS['MEETING']}</th>
<th colspan="3" class="spanLabel">${PAGE_TRANSLATION_KEYS['COMPOSITE_ADJ']}</th>
</TR>
<TR class="stepLabel numeric">
<th class="termValues">${PAGE_TRANSLATION_KEYS['TERM_SHORT']}</th>
<th class="termValues">${PAGE_TRANSLATION_KEYS['TERM_MID']}</th>
<th class="termValues">${PAGE_TRANSLATION_KEYS['TERM_LONG']}</th>
</TR>
</thead>
</table>
<c:forEach items="${form.sbus}" var="sbu" varStatus="id">
<DIV class=section>
<DIV class="title collapsable" id="SBU${sbu.sbuOID}"> ${sbu.sbuName}
<%@ include file="SbuSummaryIndicators.jspf"%>
</DIV>
<DIV class="content positioning">
<c:forEach items="${sbu.forecastUnits}" var="forecastUnit" varStatus="forecastid">
<DIV class=section>
<DIV class="title collapsable" id="FU${forecastUnit.forecastUnitOID}">${forecastUnit.forecastUnitID}
<%@ include file="ForecastUnitSummaryIndicators.jspf"%>
</DIV>
<DIV class="content factoryPositioning">
<c:forEach items="${forecastUnit.factories}" var="factory" varStatus="factoryid">
<DIV class=section>
<DIV class="title collapsed expandableFactory ajaxExpand" id="DR${forecastUnit.forecastUnitOID}_${factory.factoryOID}">(${factory.factoryID}) ${factory.factoryName}
<%@ include file="FactorySummaryIndicators.jspf"%>
</DIV>
<DIV class="content">
</DIV>
</DIV>
</c:forEach>
</DIV>
</DIV>
</c:forEach>
</DIV>
</DIV>
</c:forEach>
</div>
</html-el:form>
</body>
</html-el:html>
一个被包括就像JSPF的---
<table>
<COLGROUP class="dashRowLabel" span="1" />
<COLGROUP class="dashStep1" span="1" />
<COLGROUP class="dashStep2" span="3" />
<COLGROUP class="dashStep3" span="4" />
<COLGROUP class="dashStep4" span="4" />
<COLGROUP class="dashStep5" span="1" />
<tr class="dashProductLine">
<td class="productLineName"><html-el:text property="form.sbus[${id.count}].sbuName" styleClass="textSize textColor" readonly="true" value=" "/></td>
<c:if test="${sbu.sbuSummary.demandPlanning=='0'}">
<td class="statusWaiting stepOne"></td>
</c:if>
<c:if test="${sbu.sbuSummary.demandPlanning=='1'}">
<td class="statusNotStarted stepOne"></td>
</c:if>
<c:if test="${sbu.sbuSummary.demandPlanning=='2'}">
<td class="statusStarted stepOne"></td>
</c:if>
<c:if test="${sbu.sbuSummary.demandPlanning=='3' || compositeProcessStatus.demandPlanning=='5'}">
<td class="statusCompleted stepOne"></td>
</c:if>
<c:if test="${sbu.sbuSummary.marketing=='0'}">
<td class="statusWaiting stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.marketing=='1'}">
<td class="statusNotStarted stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.marketing=='2'}">
<td class="statusStarted stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.marketing=='3' || sbu.sbuSummary.marketing=='5'}">
<td class="statusCompleted stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.analyst=='0'}">
<td class="statusWaiting stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.analyst=='1'}">
<td class="statusNotStarted stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.analyst=='2'}">
<td class="statusStarted stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.analyst=='3' || sbu.sbuSummary.analyst=='5'}">
<td class="statusCompleted stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.spo=='0'}">
<td class="statusWaiting stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.spo=='1'}">
<td class="statusNotStarted stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.spo=='2'}">
<td class="statusStarted stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.spo=='3' || sbu.sbuSummary.spo=='5'}">
<td class="statusCompleted stepTwo"></td>
</c:if>
<c:if test="${sbu.sbuSummary.meeting=='0'}">
<td class="statusWaiting stepOne"></td>
</c:if>
<c:if test="${sbu.sbuSummary.meeting=='1'}">
<td class="statusNotStarted stepOne"></td>
</c:if>
<c:if test="${sbu.sbuSummary.meeting=='2'}">
<td class="statusStarted stepOne"></td>
</c:if>
<c:if test="${sbu.sbuSummary.meeting=='3' || sbu.sbuSummary.meeting=='5'}">
<td class="statusCompleted stepOne"></td>
</c:if>
<TD class="numeric termValues"><c:if test="${sbu.sbuSummary.shortCompositeAmount != '0'}" >${sbu.sbuSummary.shortCompositeAmount}</c:if></TD>
<TD class="numeric termValues"><c:if test="${sbu.sbuSummary.midCompositeAmount != '0'}" >${sbu.sbuSummary.midCompositeAmount}</c:if></TD>
<TD class="numeric termValues"><c:if test="${sbu.sbuSummary.longCompositeAmount != '0'}" >${sbu.sbuSummary.longCompositeAmount}</c:if></TD>
</tr>
</table>
虽然它正在工作的jsp就像----
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%response.setHeader("Pragma", "No-cache");response.setHeader("Cache-Control", "no-cache");response.setDateHeader("Expires", 0);%>
<link rel="stylesheet" href="css/pages/dashboard.css" type="text/css">
<%@ include file="Error.jspf"%>
<table class="dashboard">
<c:forEach items="${viewDashboardForm.compositeProcessStatusList}" var="compositeProcessStatus">
<tr class="dashProductLine">
<td class="name viewDashboard">${compositeProcessStatus.productLineName}</td>
<c:if test="${compositeProcessStatus.demandPlanning=='0'}">
<td class="statusWaiting stepOne"></td>
</c:if>
<c:if test="${compositeProcessStatus.demandPlanning=='1'}">
<td class="statusNotStarted stepOne"></td>
</c:if>
<c:if test="${compositeProcessStatus.demandPlanning=='2'}">
<td class="statusStarted stepOne"></td>
</c:if>
<c:if test="${compositeProcessStatus.demandPlanning=='3' || compositeProcessStatus.demandPlanning=='5'}">
<td class="statusCompleted stepOne"></td>
</c:if>
<c:if test="${compositeProcessStatus.marketing=='0'}">
<td class="statusWaiting stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.marketing=='1'}">
<td class="statusNotStarted stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.marketing=='2'}">
<td class="statusStarted stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.marketing=='3' || compositeProcessStatus.marketing=='5'}">
<td class="statusCompleted stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.analyst=='0'}">
<td class="statusWaiting stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.analyst=='1'}">
<td class="statusNotStarted stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.analyst=='2'}">
<td class="statusStarted stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.analyst=='3' || compositeProcessStatus.analyst=='5'}">
<td class="statusCompleted stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.spo=='0'}">
<td class="statusWaiting stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.spo=='1'}">
<td class="statusNotStarted stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.spo=='2'}">
<td class="statusStarted stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.spo=='3' || compositeProcessStatus.spo=='5'}">
<td class="statusCompleted stepTwo"></td>
</c:if>
<c:if test="${compositeProcessStatus.meeting=='0'}">
<td class="statusWaiting stepOne"></td>
</c:if>
<c:if test="${compositeProcessStatus.meeting=='1'}">
<td class="statusNotStarted stepOne"></td>
</c:if>
<c:if test="${compositeProcessStatus.meeting=='2'}">
<td class="statusStarted stepOne"></td>
</c:if>
<c:if test="${compositeProcessStatus.meeting=='3' || compositeProcessStatus.meeting=='5'}">
<td class="statusCompleted stepOne"></td>
</c:if>
<TD class="numeric termValues"><c:if test="${compositeProcessStatus.shortCompositeAmount != '0'}" >${compositeProcessStatus.shortCompositeAmount}</c:if></TD>
<TD class="numeric termValues"><c:if test="${compositeProcessStatus.midCompositeAmount != '0'}" >${compositeProcessStatus.midCompositeAmount}</c:if></TD>
<TD class="numeric termValues"><c:if test="${compositeProcessStatus.longCompositeAmount != '0'}" >${compositeProcessStatus.longCompositeAmount}</c:if></TD>
</tr>
</c:forEach>
</table>
不适用的风格是termvalue这是appli在包含其他以及包含的文件的jsp的标题字段 中编辑,它在包含jsp的 中工作,但不包括所有其他jsp中包含的所有其他文件。
风格
.termValues{
width: 6em;
text-align: right;
}
请参阅Markdown格式说明:http://stackoverflow.com/editing-help – McDowell 2009-09-07 11:00:39