How can i create css for this sort of requirement?
Dimensions for Custom Label Fields:
Top Margin: 0”
Side Margin: 0”
Vertical Pitch: 3”
Horizontal Pitch: 4”
Page Size: 8.5 x 11
Label Height: 3”
Label Width: 4”
Number Across: 2
Number Down: 3
PAGE Top Margin: 2”
PAGE Side Margin: .5”
This creates the backwards L shape that allows our margins for perforation.
Below is the code for which i want top adjust the above setting
<div>
<%#Eval("FirstName")%> <%#Eval("LastName")%> <br />
<%#Eval("RoleName")%><br />
<%#Eval("School")%><br />
<asp:Image ID="Image8" Width="190" Visible='<%# Eval("ProgWellness")%>' runat="server" ToolTip="Member of the Wellness Advisory Council" ImageUrl="~/DesktopModules/ThirdI.EventBooking/images/dnnp_Advisory.png" />
<br />
<asp:Image ID="Image9" Visible='<%# Eval("ProgEssMax")%>' runat="server" ToolTip="Certified in Maximized Mind" ImageUrl="~/DesktopModules/ThirdI.EventBooking/images/dnnp_MaxMind.png" />
<asp:Image ID="Image10" Visible='<%# Eval("ProgEssNerve")%>' runat="server" ToolTip="Certified in Maximized Nerve Supply" ImageUrl="~/DesktopModules/ThirdI.EventBooking/images/dnnp_NerveSupply.png" />
<asp:Image ID="Image11" Visible='<%# Eval("ProgEssWellness")%>' runat="server" ToolTip="Certified in Maximized Nutrition" ImageUrl="~/DesktopModules/ThirdI.EventBooking/images/dnnp_Nutrition.png" />
<asp:Image ID="Image12" Visible='<%# Eval("ProgEssOxygen")%>' runat="server" ToolTip="Certified in Maximized Oxygen and Lean Muscle" ImageUrl="~/Desk开发者_开发问答topModules/ThirdI.EventBooking/images/dnnp_Excercise.png" />
<asp:Image ID="Image13" Visible='<%# Eval("ProgEssBodyToxin")%>' runat="server" ToolTip="Certified in Minimized Toxins" ImageUrl="~/DesktopModules/ThirdI.EventBooking/images/dnnp_Toxicity.png" />
<asp:Image ID="Image14" Visible='<%# Eval("ProgMLHealthCenter")%>' runat="server" ToolTip="Certified in Minimized Toxins" ImageUrl="~/DesktopModules/ThirdI.EventBooking/images/dnnp_HealthCenter.png" />
</div>
i want to take print out for my above code to a page size of 8.5 by 11, with the the dimension given, how can i make setting for that? Also, i want 6 labels of mentioned size on the 8.5 by 11 size page.
Well basically CSS supports this. You can use inches as measurements (width: 4in
) and allows setting the margins of the page (see http://www.w3.org/TR/CSS21/page.html). However the support latter in browsers is not quite wide spread. Firefox/Mozilla for example doesn't, IE of since IE8, etc. So you'll need to test this.
So in your case you'll probably start with something like this:
@page {
margin-top: 2in;
margin-left: .5in;
}
div {
width: 4in;
height: 3in;
}
Otherwise it's no different than any other CSS.
精彩评论