improved alignment in forms

This commit is contained in:
Mic 2013-01-15 10:38:24 +08:00
parent 6f7b42206e
commit ffa0a6a1cf
5 changed files with 17 additions and 9 deletions

View file

@ -8,12 +8,12 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>PetClinic :: a Spring Framework demonstration</title> <title>PetClinic :: a Spring Framework demonstration</title>
<spring:url value="/resources/css/petclinic.css" var="petclinicCss" />
<link href="${petclinicCss}" rel="stylesheet"/>
<spring:url value="/webjars/bootstrap/2.2.1/css/bootstrap.min.css" var="bootstrapCss" /> <spring:url value="/webjars/bootstrap/2.2.1/css/bootstrap.min.css" var="bootstrapCss" />
<link href="${bootstrapCss}" rel="stylesheet"/> <link href="${bootstrapCss}" rel="stylesheet"/>
<spring:url value="/resources/css/petclinic.css" var="petclinicCss" />
<link href="${petclinicCss}" rel="stylesheet"/>
</head> </head>

View file

@ -8,7 +8,6 @@
<jsp:include page="../header.jsp"/> <jsp:include page="../header.jsp"/>
<body> <body>
<div class="container"> <div class="container">
<spring:url value="/resources/images/banner-graphic.png" var="banner"/> <spring:url value="/resources/images/banner-graphic.png" var="banner"/>
<img src="${banner}" /> <img src="${banner}" />
@ -16,9 +15,9 @@
<h2>Find Owners</h2> <h2>Find Owners</h2>
<spring:url value="/owners.html" var="formUrl"/> <spring:url value="/owners.html" var="formUrl"/>
<form:form modelAttribute="owner" action="${fn:escapeXml(formUrl)}" method="get" class="form-horizontal" style="width:600px;"> <form:form modelAttribute="owner" action="${fn:escapeXml(formUrl)}" method="get" class="form-horizontal" id="search-owner-form">
<fieldset> <fieldset>
<div class="controls"> <div class="control-group" id="lastName">
<label class="control-label">Last name </label> <label class="control-label">Last name </label>
<form:input path="lastName" size="30" maxlength="80"/> <form:input path="lastName" size="30" maxlength="80"/>
<span class="help-inline"><form:errors path="*" /></span> <span class="help-inline"><form:errors path="*" /></span>

View file

@ -22,7 +22,7 @@
<b>Owner:</b> ${pet.owner.firstName} ${pet.owner.lastName} <b>Owner:</b> ${pet.owner.firstName} ${pet.owner.lastName}
<br/> <br/>
<form:form modelAttribute="pet" method="${method}"> <form:form modelAttribute="pet" method="${method}" class="form-horizontal">
<fieldset> <fieldset>
<div class="control-group" id="name"> <div class="control-group" id="name">
<label class="control-label">Name </label> <label class="control-label">Name </label>
@ -40,7 +40,7 @@
</div> </div>
<div class="control-group" id="type"> <div class="control-group" id="type">
<label class="control-label">Type </label> <label class="control-label">Type </label>
<form:select path="type" items="${types}"/> <form:select path="type" items="${types}"/>
</div> </div>
<div class="form-actions"> <div class="form-actions">
<c:choose> <c:choose>
@ -59,8 +59,8 @@
<p class="submit"><input type="submit" value="Delete Pet"/></p> <p class="submit"><input type="submit" value="Delete Pet"/></p>
</form:form> </form:form>
</c:if> </c:if>
<jsp:include page="../footer.jsp"/>
</div> </div>
<jsp:include page="../footer.jsp"/>
</body> </body>
</html> </html>

View file

@ -1,5 +1,14 @@
.container { .container {
padding-top: 10px; padding-top: 10px;
margin-left: 50px; margin-left: 50px;
width: 610px;
}
.form-horizontal {
width: 100%;
}
input {
line-height: 35px;
} }

View file

@ -3,7 +3,7 @@
<head> <head>
<title>The Spring PetClinic Application</title> <title>The Spring PetClinic Application</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="../styles/petclinic.css" type="text/css"> <link rel="stylesheet" href="../css/petclinic.css" type="text/css">
</head> </head>
<body> <body>