Newbie question

D

Dave

I am new to Visual Web Developer 2005 Expres.

I am using absolute positioning and every time I add a button control to my
web form its width extends all the way to the edge of the page. IOW I get a
long skinny button that extends to the right side of the browser.

This does not appear to happen with other controls. Any idea why it happens
to the button?

Here is how the button looks in source code:
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Style="z-index: 100; left: 186px; position: absolute; top: 147px"
Text="Button" />
 
A

Allen Chen

Hi Dave,

From your description the button is expanded even though its width is not
set in the aspx, correct?

The source code you provided works fine on my side.

There're two possible reasons I can think of that can cause this problem.

1. You're probably using Style or Theme for the ASP.NET button control that
would affect the Width of the button.
2. Width of the button may be hard coded in the code behind.

Please check if my guess is correct. If it still doesn't work please send a
demo project to me. I'll try to find the root cause and tell you how to fix
it. My email is (e-mail address removed).

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Followup-Asp.Net-42336997-Upload a file to a different
site-microsoft.public.dotnet.framework.aspnet

Hello Rory,

I am Allen Chen from the newsgroup support team. In the past few days, you
have been working with me on an issue "Upload a file to a different site
" in the microsoft.public.dotnet.framework.aspnet newsgroup. I appreciate
your time working with me. I am contacting you to see whether there is
anything else we can do for you. If you have any comments on our support
service, website design, our product limitation, our process, and etc.,
please don't hesitate to let me know. I will do my best to follow up.

Thank you for using our Newsgroup Support Service!

--------------------
| From: "Dave" <[email protected]>
| Subject: Newbie question
| Date: Sun, 10 Aug 2008 16:15:45 -0700
| Lines: 15
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
| Message-ID: <OzR3Ytz#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: cpe-76-171-59-74.socal.res.rr.com 76.171.59.74
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:73630
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I am new to Visual Web Developer 2005 Expres.
|
| I am using absolute positioning and every time I add a button control to
my
| web form its width extends all the way to the edge of the page. IOW I
get a
| long skinny button that extends to the right side of the browser.
|
| This does not appear to happen with other controls. Any idea why it
happens
| to the button?
|
| Here is how the button looks in source code:
| <asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
| Style="z-index: 100; left: 186px; position: absolute; top: 147px"
| Text="Button" />
|
|
|
 
A

Allen Chen [MSFT]

Hi Dave,

Thanks for your project. Based on my research, this is a known issue of IE.

A workaround is to fix the width of the button. For example you can try
this:

<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Style="z-index: 100;
left: 186px; position: absolute; top: 147px; width:60px"
Text="Button" />


Regards,
Allen Chen
Microsoft Online Support

--------------------
| X-Tomcat-ID: 76601997
| References: <OzR3Ytz#[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Allen Chen)
| Organization: Microsoft
| Date: Mon, 11 Aug 2008 03:37:30 GMT
| Subject: RE: Newbie question
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <2pJHjP2#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 105
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:73636
| NNTP-Posting-Host: tk5tomimport1.phx.gbl 10.201.218.19
|
| Hi Dave,
|
| From your description the button is expanded even though its width is not
| set in the aspx, correct?
|
| The source code you provided works fine on my side.
|
| There're two possible reasons I can think of that can cause this problem.
|
| 1. You're probably using Style or Theme for the ASP.NET button control
that
| would affect the Width of the button.
| 2. Width of the button may be hard coded in the code behind.
|
| Please check if my guess is correct. If it still doesn't work please send
a
| demo project to me. I'll try to find the root cause and tell you how to
fix
| it. My email is (e-mail address removed).
|
| Regards,
| Allen Chen
| Microsoft Online Support
|
| Delighting our customers is our #1 priority. We welcome your comments and
| suggestions about how we can improve the support we provide to you.
Please
| feel free to let my manager know what you think of the level of service
| provided. You can send feedback directly to my manager at:
| (e-mail address removed).
|
| ==================================================
| Get notification to my posts through email? Please refer to
|
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
| ications.
|
| Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
| where an initial response from the community or a Microsoft Support
| Engineer within 1 business day is acceptable. Please note that each
follow
| up response may take approximately 2 business days as the support
| professional working with you may need further investigation to reach the
| most efficient resolution. The offering is not appropriate for situations
| that require urgent, real-time or phone-based interactions or complex
| project analysis and dump analysis issues. Issues of this nature are best
| handled working with a dedicated Microsoft Support Engineer by contacting
| Microsoft Customer Support Services (CSS) at
| http://msdn.microsoft.com/subscriptions/support/default.aspx.
| ==================================================
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
| Followup-Asp.Net-42336997-Upload a file to a different
| site-microsoft.public.dotnet.framework.aspnet
|
| Hello Rory,
|
| I am Allen Chen from the newsgroup support team. In the past few days,
you
| have been working with me on an issue "Upload a file to a different site
| " in the microsoft.public.dotnet.framework.aspnet newsgroup. I appreciate
| your time working with me. I am contacting you to see whether there is
| anything else we can do for you. If you have any comments on our support
| service, website design, our product limitation, our process, and etc.,
| please don't hesitate to let me know. I will do my best to follow up.
|
| Thank you for using our Newsgroup Support Service!
|
| --------------------
| | From: "Dave" <[email protected]>
| | Subject: Newbie question
| | Date: Sun, 10 Aug 2008 16:15:45 -0700
| | Lines: 15
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| | X-RFC2646: Format=Flowed; Original
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
| | Message-ID: <OzR3Ytz#[email protected]>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: cpe-76-171-59-74.socal.res.rr.com 76.171.59.74
| | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.phx.gbl
| | Xref: TK2MSFTNGHUB02.phx.gbl
| microsoft.public.dotnet.framework.aspnet:73630
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | I am new to Visual Web Developer 2005 Expres.
| |
| | I am using absolute positioning and every time I add a button control
to
| my
| | web form its width extends all the way to the edge of the page. IOW I
| get a
| | long skinny button that extends to the right side of the browser.
| |
| | This does not appear to happen with other controls. Any idea why it
| happens
| | to the button?
| |
| | Here is how the button looks in source code:
| | <asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
| | Style="z-index: 100; left: 186px; position: absolute; top: 147px"
| | Text="Button" />
| |
| |
| |
|
|
 
D

Dave

Thanks Allen. Setting the width attribute fixes the problem

Is this a known issue for IE7 only or all versions of IE?

So if no width attribute is specified, IE will not display the button
correctly?
 
A

Allen Chen [MSFT]

Hi Dave,

Thanks for your updating. This is a known issue of IE 7 (and IE 8 if you
run it in IE 7 Emulation mode). The button will be incorrectly expanded if
we set both left and position: absolute to it.

Currently besides fixing the width of the button we can also set position:
relative style to body element, which I think is a better workaround.

We're now investigating this issue.

Thank you for highlighting it and please let me know if you have any
further questions.

Regards,
Allen Chen
Microsoft Online Support

--------------------
| From: "Dave" <[email protected]>
| References: <OzR3Ytz#[email protected]>
<2pJHjP2#[email protected]>
<[email protected]>
| Subject: Re: Newbie question
| Date: Tue, 12 Aug 2008 20:33:07 -0700
| Lines: 30
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: cpe-76-171-59-74.socal.res.rr.com 76.171.59.74
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP03.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:73798
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks Allen. Setting the width attribute fixes the problem
|
| Is this a known issue for IE7 only or all versions of IE?
|
| So if no width attribute is specified, IE will not display the button
| correctly?
|
|
|
| | > Hi Dave,
| >
| > Thanks for your project. Based on my research, this is a known issue of
| > IE.
| >
| > A workaround is to fix the width of the button. For example you can try
| > this:
| >
| > <asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
| > Style="z-index: 100;
| > left: 186px; position: absolute; top: 147px; width:60px"
| > Text="Button" />
| >
| >
| > Regards,
| > Allen Chen
| > Microsoft Online Support
|
|
|
 
A

Allen Chen [MSFT]

Hi Dave,

Do you have any questions about this issue? Please don't hesitate to let me
know if you need further assistance.

Regards,
Allen Chen
Microsoft Online Support

--------------------
| From: "Dave" <[email protected]>
| References: <OzR3Ytz#[email protected]>
<2pJHjP2#[email protected]>
<[email protected]>
| Subject: Re: Newbie question
| Date: Tue, 12 Aug 2008 20:33:07 -0700
| Lines: 30
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: cpe-76-171-59-74.socal.res.rr.com 76.171.59.74
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP03.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:73798
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks Allen. Setting the width attribute fixes the problem
|
| Is this a known issue for IE7 only or all versions of IE?
|
| So if no width attribute is specified, IE will not display the button
| correctly?
|
|
|
| | > Hi Dave,
| >
| > Thanks for your project. Based on my research, this is a known issue of
| > IE.
| >
| > A workaround is to fix the width of the button. For example you can try
| > this:
| >
| > <asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
| > Style="z-index: 100;
| > left: 186px; position: absolute; top: 147px; width:60px"
| > Text="Button" />
| >
| >
| > Regards,
| > Allen Chen
| > Microsoft Online Support
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top