Click here to Skip to main content
13,097,225 members (63,799 online)
Rate this:
Please Sign up or sign in to vote.
I am working on an webapp for the iPhone. When I first started the app on my iPhone it looked fine but after a few minutes, and since then, all the controls on the page are very small although I specified sizes. Re-uploading the app to my server didn't solve the problem - which only occures on the iPhone.

This is one of the buttons for example: <asp:Button ID="Button1" runat="server" Font-Size="12" OnClick="Button1_Click1" Text="Upload" Height="39px" Width="82px" />

This is how it looked at the beginning:[^]
This is how it looks now:[^]
Posted 26-Sep-12 5:07am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It seems, you have dragged the controls and that gets your css file affected.

Can you have a quick look into the stylesheet. Probably you have some input class that gets affected.

Let me know, if this solves.

Member 7682309 26-Sep-12 16:40pm
Where do I find the stylesheet? What should I look for in it?
Sandip.Nascar 27-Sep-12 1:03am
Could you have a look that in asp page, you have any reference to stylesheet (.css)? If no stylesheet reference exists, then the problem is different. Let us know.
Member 7682309 27-Sep-12 1:36am
I have checked it and there is no reference to a CSS stylesheet.
Sandip.Nascar 27-Sep-12 1:40am
Did you used any theme? Could you please have a look, if the page is inherited from master page. If yes, check any css reference in master pages as well. This is definitely something related to css or inner style which gets updated automatically.

Also, have a look in the page itself, if there is any <style></style> tags.
Member 7682309 27-Sep-12 1:46am
No reference to a CSS stylesheet or <style> tags in the master page.
Member 7682309 27-Sep-12 12:43pm
Actually I figured out the server adds a <style> tag when adding the "Web host by" link at the bottom of the page. How can I solve my problem in this case?
Sandip.Nascar 27-Sep-12 12:48pm
There must be something in the style tag which makes the input control smaller. If you cannot figure it out, you delete the style for inpur or post the content within the style tag here.
Member 7682309 27-Sep-12 15:17pm
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;">
<link rel="apple-touch-icon" href="spy icon.png"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-startup-image" href="splash.png"/>
<html xmlns="">
<body style="font-size: 12" background="ios%20back.jpg">
<form method="post" action="login.aspx" id="form1" aria-orientation="horizontal" aria-setsize="12" aria-relevant="all">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUIOTk0MDU0NTVkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBSNjdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJENoZWNrQm94MVdwVDqMPUXWSnRNZPmehfJlyvZBnpuMcgNzXMuDA8pn" />

<div class="aspNetHidden">

<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBQLk2LugDgLc3uCnBALc3tSnBAL+zqO2BAKA4sljSUTPnVsqQ6yfr8zDHKzB6J4gVGczm3LKn9zxryCtLlM=" />
<img id="Image1" src="Invex%20Spy%20Title.png" style="height:50px;width:300px;" />
<br />

<span id="ContentPlaceHolder1_Label1" style="color:White;font-family:Arial;">Username:</span>
<input name="ctl00$ContentPlaceHolder1$TextBox1" type="text" id="ContentPlaceHolder1_TextBox1" style="font-size:12pt;" />
<br />
<span id="ContentPlaceHolder1_Label2" style="color:White;font-family:Arial;">Password:</span>
<input name="ctl00$ContentPlaceHolder1$TextBox2" type="password" id="ContentPlaceHolder1_TextBox2" style="font-size:12pt;" />
<br />
<br />
<span style="color:White;font-size:12pt;"><input id="ContentPlaceHolder1_CheckBox1" type="checkbox" name="ctl00$ContentPlaceHolder1$CheckBox1" /><label for="ContentPlaceHolder1_CheckBox1">Remember me</label></span>
<br />
<br />
<input type="submit" name="ctl00$ContentPlaceHolder1$Button1" value="Login" id="ContentPlaceHolder1_Button1" style="font-size:12pt;height:100px;font-size: 12" />


Web hosting by

<script language="JavaScript" src=""></script>
Member 7682309 27-Sep-12 15:19pm
This is the login page. As you can see the server adds a banner at runtime (I don't see it when I open the file on the server - only when I navigate to it and click on 'View Source').
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

OK - When I looked at the page source I noticed that a style property was added to every control on the page. I was able to fix my problem by adding the same style property to my original code.
(By the way, I still don't understand why my solution works exactly.)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100