Improve company productivity with a Business Account.Sign Up

x
?
Solved

Need help in formatting this HTML form

Posted on 2009-07-07
5
Medium Priority
?
306 Views
Last Modified: 2012-05-07
Hi Experts,
                   I need help in formatting an HTMl form to look exactly the same like the snap shot.
                   Can you please help me in achieving this.

                   I have attached my current code, current out and desired output.
       
<style type="text/css">
 .tofrom {
        height:18px;
        float:left;
        width:40px;
        padding-top:3px;
}
.calimg {
        margin:1px 0 0 0;
        float:left;
        width:28px;
}
</style>
</head>
</body>
 
<div class="sidebar-panel" style="border:5px solid #99CCFF; width:145px; padding:2px; background:white;">
 
 <form:form commandName="detailForm" method="GET">
<div style="font-weight:bold; color:#000">Report Group:</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="chartGroup" items="${chartGroups}" /></div>
</div>
 
<div style="font-weight:bold; color:#000">Report SubGroup:</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="chartSubgroup" items="${chartSubgroups}" /></div>
</div>
 
<div style="font-weight:bold; color:#000">Chart Type:</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="chartType" items="${chartTypes}" id="ct"/></div>
</div>
 
<div style="font-weight:bold; color:#000">Timeline</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="timeline" items="${timelines}" id="tm"/></div>
</div>
 
<div style="color:black;">
<div class="tofrom">From:</div>
<div class="calimg"><img src="/analytics/static/images/CAL.PNG" name="Calendar" width="18" height="18" id="Calendar" onClick="displayDatePicker('from_date');" /></div>
<form:input path="startDt" id="from_date" size="7" maxlength="8" />
</div>
<div style="color:black;">
<div class="tofrom">To:</div>
<div class="calimg"><img name="Calendar" src="/analytics/static/images/CAL.PNG" width="18" height="18" id="Calendarm" onClick="displayDatePicker('to_date');" /> </div>
<form:input path="endDt" id="to_date" size="7" maxlength="8" />
</div>
 
<div style="font-weight:bold; color:#000">Customer Type</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="liabilityCode" items="${liabilityCodes}" id="tm"/></div>
</div>
 
 
 
<h5 style="padding:0 30px 10px 0; font-size:9px; font-wight:lighter; background:white; ">
<div style="width:40px; font-size:.8em; font-weight:lighter;">
<input type="submit" value="Update Chart" />
</div>
</h5>
 
<div style="clear:both;"></div>
</form:form>

Open in new window

View-Detail-Toolbar.PNG
Current.PNG
0
Comment
Question by:aman0711
  • 2
  • 2
5 Comments
 
LVL 19

Assisted Solution

by:erikTsomik
erikTsomik earned 800 total points
ID: 24795322
try this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Example of shadowed DIV using the outset border property (liquid size)</title>
<style type="text/css">
 .tofrom {
        height:18px;
        float:left;
        width:40px;
        padding-top:3px;
}
.calimg {
        margin:1px 0 0 0;
        float:left;
        width:28px;
}
</style>
</head>
<body>
<div class="sidebar-panel" style="border:5px solid #99CCFF; width:145px; padding:2px; background:white;">
 
 <form:form commandName="detailForm" method="GET">
<div style="font-weight:bold; color:#000">Report Group:</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="chartGroup" items="${chartGroups}" /></div>
</div>
 
<div style="font-weight:bold; color:#000">Report SubGroup:</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="chartSubgroup" items="${chartSubgroups}" /></div>
</div>
 
<div style="font-weight:bold; color:#000">Chart Type:</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="chartType" items="${chartTypes}" id="ct"/></div>
</div>
 
<div style="font-weight:bold; color:#000">Timeline</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="timeline" items="${timelines}" id="tm"/></div>
</div>
 
<div style="color:black;">
<div class="tofrom">From:</div>
<div class="calimg"><img src="/analytics/static/images/CAL.PNG" name="Calendar" width="18" height="18" id="Calendar" onClick="displayDatePicker('from_date');" /></div>
<form:input path="startDt" id="from_date" size="7" maxlength="8" />
</div>
<div style="color:black;">
<div class="tofrom">To:</div>
<div class="calimg"><img name="Calendar" src="/analytics/static/images/CAL.PNG" width="18" height="18" id="Calendarm" onClick="displayDatePicker('to_date');" /> </div>
<form:input path="endDt" id="to_date" size="7" maxlength="8" />
</div>
 
<div style="font-weight:bold; color:#000">Customer Type</div>
<div align="center" style="margin:0 0 5px 0; ">
<div style="margin:0 0 5px 0;"><form:select path="liabilityCode" items="${liabilityCodes}" id="tm"/></div>
</div>
 
 
 
<h5 style="padding:0 30px 10px 0; font-size:9px; font-wight:lighter; background:white; ">
<div style="width:40px; font-size:.8em; font-weight:lighter;">
<input type="submit" value="Update Chart" />
</div>
</h5>
 
<div style="clear:both;"></div>
</form:form>
</body>
</html>
0
 
LVL 10

Author Comment

by:aman0711
ID: 24795384
Hey Erik,

                This didnt make any difference :(

Current.PNG
0
 
LVL 13

Expert Comment

by:myderrick
ID: 24812348
I think you should use labels and fieldset and CSS to style the form. i have done something simple which you can modify.

Good luck.

MD
<style type="text/css">
#form{
 
		margin:1em 0;
 
		color:#000000;
 
		width:300px;
		 /* customize width, this form have fluid layout */
 
		}
		
		#form h3{
 
		margin:0;
 
		background:#57a700 url(../images/form2/form_heading.gif) repeat-x;		
 
		color:#fff;
 
		font-size:20px;
 
		border:1px solid #57a700;
 
		border-bottom:none;
 
		}		
 
 
 
#form fieldset{
 
		margin:0;
 
		padding:10px;
 
		border:none;	
 
		border-top:3px solid #FFF;
 
		background:#FFFFFF;	
 
		padding-bottom:1em;
 
		}		
		
		#wrapper
		{
			background:#666;
			border:solid 1px #fff;
			
			width:300px;
 
			padding:15px;
			/*overflow:auto;*/
			color:#FFFFFF;
			
			
/*			font-weight:bold;*/
	}
</style>

Open in new window

0
 
LVL 13

Accepted Solution

by:
myderrick earned 1200 total points
ID: 24812366
Sorry forgot to creat a submit button. Here it is.

MD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
 
<style type="text/css">
#form{
 
		margin:1em 0;
 
		color:#000000;
 
		width:300px;
		 /* customize width, this form have fluid layout */
 
		}
		
		#form h3{
 
		margin:0;
 
		background:#57a700 url(../images/form2/form_heading.gif) repeat-x;		
 
		color:#fff;
 
		font-size:20px;
 
		border:1px solid #57a700;
 
		border-bottom:none;
 
		}		
 
 
 
#form fieldset{
 
		margin:0;
 
		padding:10px;
 
		border:none;	
 
		border-top:3px solid #FFF;
 
		background:#FFFFFF;	
 
		padding-bottom:1em;
 
		}		
		
		#wrapper
		{
			background:#666;
			border:solid 1px #fff;
			
			width:300px;
 
			padding:15px;
			/*overflow:auto;*/
			color:#FFFFFF;
			
			
/*			font-weight:bold;*/
	}
</style>
</head>
 
<body>
<div id="wrapper">
<form  method="post" action="r"  id="form" > 
      
      <h3>Enter Search criteria</h3>
      
          <fieldset>
          <label>Username</label>
          
          <input  type="text" name="name" value="" />
          </fieldset>
          <fieldset style="text-align:center">
          <label>
                
                <span>Select country: </span><br />
       
				<select name="country" id="country" style="text-align:center">
					<option value="">SPOKE</option>
					<option value="GH">GH</option>
					<option value="NG">NG</option>
					<option value="SL">SL</option>
   					<option value="GAM">GAM</option>
                    <option value="CAM">CAM</option>
 
				</select>
                
         
		  </label>	
	      </fieldset>
          
      <fieldset>
				<label>
					Activity
                    
               </label><br />
				<select name="activity" id="activity"  class="validate[required]"  >
					<option value="">Choose an activity</option>
					<option value="One">One</option>
					<option value="twi">Two</option>
					
				</select>
	
      </fieldset>   
      
      
      <fieldset>
          <label>From: img goes here </label>
          
          <input  type="text" name="name" value="" />
          </fieldset>
          
          <fieldset>
          <label>TO: img goes here </label>
          
          <input  type="text" name="name" value="" />
          </fieldset>
          
          
          <fieldset>
        <button type="submit">Submit &raquo;</button>
        
        </fieldset>
	</form>			
    
    </div>
</body>
</html>

Open in new window

0
 
LVL 10

Author Closing Comment

by:aman0711
ID: 31600655
thnx :)
0

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question