From: Roland Haeder <roland@mxchange.org> Date: Fri, 21 Aug 2015 09:32:12 +0000 (+0200) Subject: Fixes for bad HTML with better HTML and CSS X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=48b22259cab4c2108c6508c7886e285b596db67c;p=pizzaservice-war.git Fixes for bad HTML with better HTML and CSS Signed-off-by:Roland Häder <roland@mxchange.org> --- diff --git a/web/index.jsp b/web/index.jsp index 69f8b768..916ccd50 100644 --- a/web/index.jsp +++ b/web/index.jsp @@ -41,59 +41,59 @@ <div id="content"> <table class="table"> - <thead> - <tr> - <th class="table_header_column"> - Bestellen? - </th> - <th class="table_header_column"> - Anzahl: - </th> - <th class="table_header_column"> - Produkt: - </th> - <th class="table_header_column"> - Einzelpreis: - </th> - </tr> - </thead> + <tr> + <th class="table_header_column"> + Bestellen? + </th> + <th class="table_header_column"> + Anzahl: + </th> + <th class="table_header_column"> + Produkt: + </th> + <th class="table_header_column"> + Einzelpreis: + </th> + </tr> + </table> - <tbody> - <% - // Get Iterator - Iterator<Product> iterator = app.getAvailableProducts(); + <% + // Get Iterator + Iterator<Product> iterator = app.getAvailableProducts(); - // "Walk" through all products and unmark them as ordered - while (iterator.hasNext()) { - // Get product instance - Product product = iterator.next(); + // "Walk" through all products and unmark them as ordered + while (iterator.hasNext()) { + // Get product instance + Product product = iterator.next(); - // Unmark as ordered - app.unmarkProductAsOrdered(product, session); - %> + // Unmark as ordered + app.unmarkProductAsOrdered(product, session); + %> + <form action="<%=request.getContextPath()%>/form_handler/add_item.jsp" accept-charset="utf-8" id="form" method="post"> + <table class="table"> + <tbody> <tr> - <form action="<%=request.getContextPath()%>/form_handler/add_item.jsp" accept-charset="utf-8" id="form" method="post"> - <td> + <td class="table_data_column"> <input class="submit" type="submit" name="add" value="Hinzufügen" /> <input class="input" type="hidden" name="<%=PizzaApplication.HTTP_PARAM_ITEM_ID%>" value="<%=product.getId()%>" /> <input class="input" type="hidden" name="<%=PizzaApplication.HTTP_PARAM_ITEM_TYPE%>" value="<%=Product.class%>" /> </td> - <td> + <td class="table_data_column"> <input class="input" type="text" name="<%=PizzaApplication.HTTP_PARAM_AMOUNT%>" size="3" maxlength="20" /> </td> - <td> + <td class="table_data_column"> <%=product.getTitle()%> </td> - <td align="right"> + <td class="table_data_column" align="right"> <fmt:formatNumber type="currency"><%=product.getPrice()%></fmt:formatNumber> </td> </tr> - </form> - <% - } - %> </tbody> </table> + </form> + <% + } + %> </div> </div> diff --git a/web/style.css b/web/style.css index ca487498..b44a60ae 100644 --- a/web/style.css +++ b/web/style.css @@ -60,3 +60,11 @@ ul.footer_nav li { list-style: none; padding-left: 5px; } + +.table_header_column { + width: 100px; +} + +.table_data_column { + width: 100px; +}