Solved

How can I position web control inside a div?

Posted on 2009-05-12
3
231 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Computer running slow? Taking forever to open a folder, documents, or any programs that you didn't have an issue with before? Here are a few steps to help speed it up. The programs mentioned below ALL have free versions, you can buy them if you w…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 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