[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to stop user control from being aligned to the right on Microsoft sharepoint in mobile browsers

Posted on 2012-08-27
3
Medium Priority
?
511 Views
Last Modified: 2012-08-28
I have a user control that was created in the .net environment using a vb code behind.  I put it onto a sharepoint page that looks perfectly fined when viewed through IE on a desktop or laptop computer but when viewed through a mobile phone (either android or IOS) it appears that it is aligned to the right.  I've tried changing certain information in my user control.  I've tried changing the container div to be 100% and i've tried using the align = left property on some of the tables in the control but it doesn't seem to be helping.  After asking around a co-worker told me that they ran into this problem before on sharepoint and it had something to do with the web config and was a simple fix.  However, they have no idea what the change is.  Does anyone have any theories on why my control might be aligning right for mobile browsers?

Thanks in advance
0
Comment
Question by:kpbarem
  • 2
3 Comments
 

Author Comment

by:kpbarem
ID: 38338663
As an update to this- i've discovered that it is not a mobile browser issue but rather a Safari and Chrome issue.  Everything but IE that i've tested seems to be aligning this to the right.  Here is the start of the control.

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="PayDues.ascx.vb" Inherits="PayDues" %>

<style type="text/css">
        </style>


<body>

 <asp:Label ID="Lbl_PayYourDues" runat="server" Font-Bold="True" Font-Size="Large"
    ForeColor="Navy" Text="Pay Your Dues"></asp:Label><br />
                <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Large"
                    ForeColor="Navy" Style="text-align: left" Width="272px">Bill To</asp:Label><br />
    <table id="tblBillingInfo" runat="server" align="left">
        <tr>
            <td style="vertical-align: top">
    <table id="tblBillTo" runat="server" align="left">
        <tr>
            <td colspan="3">
                <asp:Label ID="lblFullName" runat="server" Width="288px"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:Label ID="lblAddress1" runat="server" Width="280px"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:Label ID="lblCityStateZip" runat="server" Width="280px"></asp:Label></td>
        </tr>
        <tr> <td style="width: 291px">
            <br />
                <asp:Button ID="btnEdit" runat="server" Text="Change Bill To" style="vertical-align: bottom;" Width="150px"/><br />
        </td></tr>
        <tr>
            <td style="width: 291px">
        <asp:Button ID="Btn_ViewDuesSummary" runat="server" Text="Dues Summary"
                CausesValidation="False" Width="150px" /></td>
        </tr>
    </table>
                <table id="tblEdit" runat="server" align="left">
                    <tr>
                        <td class="style4">
                            <span style="color: #ff0000">*</span>First Name</td>
                        <td style="width: 247px">
                            <asp:TextBox ID="txtFirstName" runat="server" Width="151px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="FirstNameValidator" runat="server"
                                ControlToValidate="txtFirstName" ErrorMessage="Please Enter First Name"
                                ForeColor="White" ValidationGroup="BillingInfo">*</asp:RequiredFieldValidator>
                        &nbsp;&nbsp;&nbsp;&nbsp; MI <asp:TextBox ID="txtMI" runat="server" Width="34px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;&nbsp;<span style="color: red">*</span>Last Name&nbsp;
                            <asp:TextBox ID="txtLastName" runat="server" Width="119px"></asp:TextBox>
                        &nbsp;<asp:RequiredFieldValidator ID="LastNameValidator" runat="server"
                                ControlToValidate="txtLastName" ErrorMessage="Please Enter Last Name"
                                ForeColor="White" ValidationGroup="BillingInfo">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>                    
                    <tr>
                        <td class="style4">
                            <span style="color: red">*</span>Billing Address&nbsp;&nbsp; </td>
                        <td style="width: 247px">
                            <asp:TextBox ID="txtAddress1" runat="server" Width="207px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="BillingAddressValidator" runat="server"
                                ControlToValidate="txtAddress1" ErrorMessage="Please Enter Billing Address"
                                ForeColor="White" ValidationGroup="BillingInfo">*</asp:RequiredFieldValidator>
                        </td>
                        <td>
                            <span style="color: red">&nbsp;*</span>Email&nbsp;<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="EmailAddressValidator" runat="server"
                                ControlToValidate="txtEmail" ErrorMessage="Please Enter Email Address"
                                ForeColor="White" ValidationGroup="BillingInfo">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
0
 
LVL 23

Accepted Solution

by:
Roopesh Reddy earned 1500 total points
ID: 38341680
Hi,

Your code looks ambigious!!!

Try to design the form using DIV tags instead of Tables!

Consider Table less design!
http://www.w3.org/2002/03/csslayout-howto

Moreover, if you wish to continue with the Tables, then try to validate your code with W3C Validator - http://validator.w3.org/#validate_by_uri

If the HTML code is W3C compatible, then it will be working fine in cross browsers!!!

Hope it helps u...
0
 

Author Closing Comment

by:kpbarem
ID: 38341744
Thanks
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question