I have a form with textfields in it. The text fields are adjacent to some boxes that hold an icon in them. As I shorten the window, the icon starts to display on top of the field.
My major concern here is getting this to adjust for multiple platforms i.e. mobile.
I prefer to have the icon boxes as close to a fixed width as I possibly can.
For reference, please see https://codepen.io/GrandvincentMarion/pen/KpmgOe/
Here is some of the relevant CSS code from codepen but I advise you to directly visit the link, it will explain exactly what is happening to me when I make my window width the shortest it can be.
form {
border-radius: 5px;
max-width:700px;
width:100%;
margin: 5% auto;
background-color: #FFFFFF;
overflow: hidden;
}
input {
border-radius: 0px 5px 5px 0px;
border: 1px solid #eee;
margin-bottom: 15px;
width: 75%;
height: 40px;
float: left;
padding: 0px 15px;
}
.form-group {
overflow: hidden;
clear: both;
}
.icon-case {
width: 35px;
float: left;
border-radius: 5px 0px 0px 5px;
background:#eeeeee;
height:42px;
position: relative;
text-align: center;
line-height:40px;
}
i {
color:#555;
}
.contentform {
padding: 40px 30px;
}
Give width: calc(100% - 67px); to input and textarea and it will display inline in small screen