By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,478 Members | 1,833 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,478 IT Pros & Developers. It's quick & easy.

How to make font size static?

P: 19
Hi, guys.

I'm developing a web application for Sales Department people in my company. I used my 1024X768 resolution and "Medium" IE text size to test my Layout and it worked fine. However, some people in Sales Department use different settings like "800X600", "Larger" IE text size or even "Large font" in Appearance tab in Display Property. Those different settings would mess up my layout. What I want to do is to set font size of labels, buttons and etc (preferrably everything that has text on it, except image) be static. So no matter what kind of font setting user has, the web page would show up in the same way.

Now, I can get part of my page worked. In the following code, the font size in the table remain the same regardless whatever the user's font setting is:

Expand|Select|Wrap|Line Numbers
  2. <P>
  3.                 <TABLE id="Table5" style="Z-INDEX: 119; LEFT: 8px; WIDTH: 112px; POSITION: absolute; TOP: 48px; HEIGHT: 516px"
  4.                     cellSpacing="1" cellPadding="1" width="112" border="1" runat="server">
  5.                     <tr>
  6.                         <td>
  7.                             <P><asp:label id="Label49" Width="152px" runat="server" Font-Bold="True">Column Display</asp:label>
  8.                                 <MEDIUM>
  9.                                     <asp:linkbutton id="Linkbutton1" Width="120px" runat="server" ForeColor="DodgerBlue" Font-Bold="True"
  10.                                         BackColor="Transparent">Select All</asp:linkbutton>
  11.                                     <asp:linkbutton id="Linkbutton2" Width="120px" runat="server" ForeColor="DodgerBlue" Font-Bold="True"
  12.                                         BackColor="Transparent">Deselect All</asp:linkbutton>
  13.                                     <asp:linkbutton id="Linkbutton_userSetting" Width="150px" runat="server" ForeColor="DodgerBlue"
  14.                                         Font-Bold="True" BackColor="Transparent">Save user Setting</asp:linkbutton>
  15.                                 </MEDIUM>
  16.                             </P>
  17.                         </td>
  18.                     </tr>
  19.                     <TR>
  20.                         <TD style="WIDTH: 334px; HEIGHT: 7px">
  21.                             <P><asp:checkbox id="CB_Item" runat="server" Text="Item"></asp:checkbox><BR>
  22.                                 <asp:checkbox id="CB_POnum" runat="server" Text="PO#"></asp:checkbox><BR>
  23.                                 <asp:checkbox id="CB_Container" runat="server" Text="Container"></asp:checkbox><BR>
  24.                                 <asp:checkbox id="CB_ETA" runat="server" Text="ETA"></asp:checkbox><BR>
  25.                                 <asp:checkbox id="CB_category" runat="server" Text="Category"></asp:checkbox><BR>
  26.                                 <asp:checkbox id="CB_Brand" runat="server" Text="Brand"></asp:checkbox><BR>
  27.                                 <asp:checkbox id="CB_Supplier" runat="server" Text="Supplier"></asp:checkbox><BR>
  28.                                 <asp:checkbox id="CB_ItemDesc" runat="server" Text="Item Desc."></asp:checkbox><BR>
  29.                                 <asp:checkbox id="CB_Size" runat="server" Text="Size"></asp:checkbox><BR>
  30.                                 <asp:checkbox id="CB_PackSize" Height="22px" runat="server" Text="Pack Size"></asp:checkbox><BR>
  31.                                 <asp:checkbox id="CB_Qty_on_hand" runat="server" Text="Qty On Hand"></asp:checkbox><BR>
  32.                                 <asp:checkbox id="CB_Qty_warehouse" runat="server" Text="Qty On All WH"></asp:checkbox><BR>
  33.                                 <asp:checkbox id="CB_Qty_Order" runat="server" Text="Qty On Order"></asp:checkbox><BR>
  34.                                 <asp:checkbox id="CB_Unit" runat="server" Text="Unit"></asp:checkbox><BR>
  35.                                 <asp:checkbox id="CB_ShipTo" runat="server" Text="Ship To"></asp:checkbox><BR>
  36.                                 <asp:checkbox id="CB_Group" runat="server" Text="Group"></asp:checkbox><BR>
  37.                                 <asp:checkbox id="CB_GroupDesc" runat="server" Text="Group Desc."></asp:checkbox><BR>
  38.                                 <asp:checkbox id="CB_CatDesc" runat="server" Text="Category Desc."></asp:checkbox><BR>
  39.                                 <asp:checkbox id="CB_6wks" runat="server" Text="6 Wks Avg Movement"></asp:checkbox><BR>
  40.                                 <asp:checkbox id="CB_LastReceivedDate" runat="server" Text="Last Received Date"></asp:checkbox><BR>
  41.                                 <asp:checkbox id="CB_lastCost" Visible="False" runat="server" Text="Last Cost" ForeColor="Red"></asp:checkbox><BR>
  42.                                 <asp:checkbox id="CB_avgCost" Visible="False" runat="server" Text="Avg. Cost" ForeColor="Red"></asp:checkbox><BR>
  43.                                 <asp:checkbox id="CB_LastCostUS" Visible="False" runat="server" Text="Last Cost (US$)" ForeColor="Red"></asp:checkbox><BR>
  44.                                 <asp:checkbox id="CB_avgCostUS" Visible="False" runat="server" Text="Avg. Cost (US$)" ForeColor="Red"></asp:checkbox></P>
  45.                         </TD>
  46.                     </TR>
  47.                     <TR>
  48.                     </TR>
  49.                 </TABLE>
  50.             </P>
Of course, in my style sheet, i have:
Expand|Select|Wrap|Line Numbers
  2. P { FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: arial }
  4. SMALL    {    
  5.     font-size:    .7em;
  6.     }    
  8. MEDIUM    {    
  9.     font-size:    .9em;
  10.     }    
  12. BIG    {    
  13.     font-size:    1.17em;
  14.     }    

However, when i tried to apply same logic to other tables in my page, the style doesn't work. I have no idea what happen out there. Anyone can give me some suggestions?
Jan 25 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.