Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 259
  • Last Modified:

How can I position web control inside a div?

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
lapucca
Asked:
lapucca
  • 2
2 Solutions
 
mpeaden2Commented:
Read up on CSS...
CSS is the basis for great web design
0
 
rdoran0928Commented:
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
 
mpeaden2Commented:
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now