Forum Moderators: not2easy
I would like my layout to be; name, email, phone number displayed top left. One text field under the other. (no problem with this).
Delivery address text area displayed top right. (here is where I am having trouble, it sits at the bottom right of the form).
image order, quantity and size to sit in a row (spanning the width of the page) at the bottom.
Could someone help please?
Here is my code:
<div class="delivery">
<p>
<label for="address">Delivery address:</label>
<textarea name="address" id="address" cols"45" rows="5"></textarea>
</p>
</div>
.delivery {
width:420px;
padding:5px;
margin-top:0px;
}
The margin-top property is not doing anything I have messed about with the float and margin properties but it won't shift from the bottom of the page.
Delivery address text area displayed top right. (here is where I am having trouble, it sits at the bottom right of the form).
In order for the floated element to float, it has to have something to float around - put the delivery element first in the code source. Additionally, only element on the page using this selector? Make it an ID (not the problem, but is appropriate.) Also a wrapping div is probably not necessary, use the <p> you have there.
#delivery {
float: right;
width:420px;
padding:5px;
margin-top:0px;
}
...........
<p id="delivery">
<label for="address">Delivery address:</label>
<textarea name="address" id="address" cols"45" rows="5"></textarea>
</p>
<div id="company-info">
Name, address, etc, I will naturally be at the LEFT if a selector doesn't tell me to do otherwise.
</div>