Bharat
Bharat

Reputation: 19

avoid the auto increase font size c#

I am using MasterPage and using using a CSS in master page. My problem is in its content page, I have a messgage box comes up in some condition resulting FONT SIZE INCREASE. I do not have any font specification in my content page. I do not know how my content page font size change when I click on "OK" to my message box.

Please suggest me some solution.

Thanks

Upvotes: 0

Views: 1024

Answers (3)

Daksh Prajapati
Daksh Prajapati

Reputation: 1

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <% for (int i = 1; i < 6; i++)
        { %>
           <asp:Label ID="Label1" runat="server" Text="Gujarat University" Font-Size=" <% i.ToInt16() %>"></asp:Label>
           <% 
        } %>
            
    </form>
</body>
</html>

Upvotes: 0

Bharat
Bharat

Reputation: 19

I got rid of it. Initially the problem cause was, click on 'ok' to message box which was generated by JavaScript 'alert'. I tried to put MessageBox from System.Windows.Forms reference. Using MessageBox ,got the solution.

But I did not understand the reason, why using 'alert' was causing problem. If someone can throw light on it, it would be helpful for me and may be for others as well.

Upvotes: 0

Joel Barsotti
Joel Barsotti

Reputation: 3089

How are you applying you styles? Are you doing it with Javascript or some framework?

If that's the case obviously some sort of error could result in a page reset, or the page dropping the styles and going to a default rendering.

You really need to post code for a better response.

Upvotes: 0

Related Questions