Solved

How can I position web control inside a div?

Posted on 2009-05-12
3
241 Views
Last Modified: 2012-05-06
Hi, I am a Windows Application developer and new to Web development.  I found it very annoying on placing web control in the Design view.  I'm using VS 2008 and .net 3.5.  I think you would know what I mean.  all web controls drag from Tools to the form area is just fixated at the left uppper corner and cannot be moved.  I select to use Relative position but that only work for moving the div around but still a textbox is inserted at the bottom left corner outside of the div and cannot be move at all!
I have a ASP.NET 3.5 begginer book and so far I can't find anything about how to address this. Can someone tell me how to position web controls in the design view or point me to some online article on how to do this.  Thank you.
0
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:mpeaden2
ID: 24367571
Read up on CSS...
CSS is the basis for great web design
0
 
LVL 4

Assisted Solution

by:rdoran0928
rdoran0928 earned 200 total points
ID: 24369382
Go into the page source (not the designer) and set the control's position to an absolute location.  For example:

                <asp:Label ID="MainTitle" runat="server"
                Text="Stewardship" Font-Size="14pt" Font-Names="Verdana"                      
                ForeColor="Green" Font-Bold="True" Font-Italic="True"
                style="position: absolute; left: 200px; top: 12px; ">
                </asp:Label>

Another, less precise way is to use linke breaks and/or spaces:

                   <br /><br />

                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
0
 
LVL 3

Accepted Solution

by:
mpeaden2 earned 300 total points
ID: 24369450
If my first answer id unacceptable for you, and you just want to put something together fast, and you don't want to write html code.. you can still do this without writing html code. right click on your project and click 'Add New Item' then look for style sheet. Add this to your project, open it and right click in a tag to edit.. you have quite a bit of flexibility, but you will eventually get frustrated with it, and end up buying a CSS book.

Please mark as answer if either of my post were helpful to you... thanks,
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem with Lenovo M73 Tiny with Dual Display 10 46
WIndows 7 remote desktop issue 6 79
GitHub 1 34
Migrating emails from desktop Outlook to Exchange online 3 49
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decadeā€¦

736 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