Solved

How can I position web control inside a div?

Posted on 2009-05-12
3
209 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
Comment Utility
Read up on CSS...
CSS is the basis for great web design
0
 
LVL 4

Assisted Solution

by:rdoran0928
rdoran0928 earned 200 total points
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now