Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on a site for an insurance agency. I have the drop down field where you can choose the type of insurance you want to get a quote for. I then added the zip code input field but don't know how to move it so it is directly across from the drop down. At this moment it is right underneath and aligned with the drop down. I know that it has something to do with absolute or relative positioning, but I am a beginner and I am not sure, please help? Here is the code...

What I have tried:

HTML
<div id="Layer1" style=position:float; right:; alignment-adjust: right; 224 px;top: 97 px><input type="text" name="zipCode" value=""    pattern="\d{5}([\-]\d{4})?" required="required"  /></div>
Posted
Updated 10-May-20 1:07am
v2


  • This has nothing to do with C++. Please always tag your questions apropriately. No tag is better than a wrong tag.
  • Your ML code is malformed. Attributes (here, the style attribute of the div tag) should be fully quoted. You should really take the time to learn the basics of HTML/CSS before attempting to handle any professional project.
  • Here is a link to a quick tutorial about how placement can be achieved in HTML/CSS documents: CSS Layout - The position Property[^]. And here is a link to a search page which provides a lot of other sources: CSS positionning[^].
 
Share this answer
 
First of all, I would try to correct syntax as phil.o said:
HTML
<div id="Layer1" style="position:float; right:; alignment-adjust: right; 224 px;top: 97 px"><input type="text" name="zipCode" value=""    pattern="\d{5}([\-]\d{4})?" required="required"  /></div>
 
Share this answer
 
v2
Comments
Richard MacCutchan 10-May-20 7:50am    
But preferably without the rogue <pre> tag. :/
Patrice T 10-May-20 7:57am    
Ooops, thank you :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900