Reputation: 104741
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div style="padding: 0px 45px 0px 45px">
<asp:FormView ID="fvAccounts" runat="server" DataKeyNames="AccountId" DataSourceID="edsAccounts" EnableModelValidation="True" Width="100%">
<EditItemTemplate>
<%-- continuing --%>
I want the FormView to be 45px (hippos :P) away from the page's width, so I wrapped it with a div setting its padding to 45 for right and left, but it didn't work; the right side goes out the div. I want it to be minimized within the div.
Note the black line in the image, it shows where the edge of the parent is, I want the external right side to be 45px away from it to inside.
Upvotes: 0
Views: 7546
Reputation: 104741
Well I solved my issue in quite a different way.
I set the FormView's Width to 80% and I wrapped it with a center Html tag.
<center>
<FormView Width="80%" runat="server" />
</center>
Upvotes: 0
Reputation: 10088
You must have a width set on some element inside the <div style="padding:0 45px">
.
Reduce the width by 90px because that space is now taken up by the padding.
Upvotes: 0
Reputation: 943564
The CSS validator is your friend.
45 what? Hippos? For lengths (other than 0) units are required.
padding: 45mm;
padding: 45%;
padding: 45pt;
padding: 45px;
and so on.
Upvotes: 3