|
-
Apr 28th, 2006, 02:26 PM
#1
Thread Starter
Hyperactive Member
DIV question - the big one
Hello
Using VS.net 2002 I started a project and added some pages. Each page has a DIV element on it that was created by the editor when it created the page.
I've been trying to figure out what the heck a DIV is and what it's for. The docs say it's a container... I find all kinds of refferences to creating them dynamically at run time and such things but I can't figure out what they are really for or if I really need them on my pages just sitting there taking up space and causing trouble with alignment and formating.
Thanks
David
-
Apr 28th, 2006, 03:12 PM
#2
Re: DIV question - the big one
DIVisable element.
It is a box that you can place things in. It is usually itself invisible, except that it can be made visible through CSS.
Most people use them to group things together and then position them.
They replace the need for tables.
I use them almost exclusively.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Apr 28th, 2006, 03:30 PM
#3
PowerPoster
Re: DIV question - the big one
its also for so javascript can find that element and do stuff inside it, ideal if you want to place a live current time in a div cell
-
Apr 28th, 2006, 04:43 PM
#4
Thread Starter
Hyperactive Member
Re: DIV question - the big one
I'm about half way thru "Learn ASP.net in 21 days" and As far as I can tell they don't talk about tables or DIV. The lack of info out there about these elements that everyone seems to be using and familiar with is fustrating to say the least.
I'm not doing anything with CSS right now and I don't see me doing it in the future (unless it gets me back some the features, methods, events and properties that I lost going from VB.net to ASP.net with this app).
I'm not using tables and I'm clueless as to when I might need to.
In design view the DIV appears as a small box up in the upper left corner. in the HTML view it appears to encompass the entire page with the form tags inside of it.
Am I missing something here? I can't see a use for the DIV element in my app.
Do I need it on my page?
Will I lose any functionallity without it?
Is there an authoritative site about these types of elements?
Thanks
-
Apr 28th, 2006, 04:51 PM
#5
PowerPoster
Re: DIV question - the big one
DIV isnt ASP.NET code/tag - its HTML
-
Apr 28th, 2006, 05:29 PM
#6
Re: DIV question - the big one
 Originally Posted by David RH
I'm about half way thru "Learn ASP.net in 21 days" and As far as I can tell they don't talk about tables or DIV. The lack of info out there about these elements that everyone seems to be using and familiar with is fustrating to say the least.
That is because positioning and layout isn't the focus of your book.
I'm not doing anything with CSS right now and I don't see me doing it in the future (unless it gets me back some the features, methods, events and properties that I lost going from VB.net to ASP.net with this app).
I would urge you to reconsider. CSS is one of the most powerful tools you can ever use for layout, stylization, etc. Without it, you have a black and white page with some text. With it, you have a masterpeice.
I'm not using tables and I'm clueless as to when I might need to.
You would use them when you have tables that you need to place on the page =) (Data in an excel-type format).
In design view the DIV appears as a small box up in the upper left corner. in the HTML view it appears to encompass the entire page with the form tags inside of it.
Am I missing something here? I can't see a use for the DIV element in my app.
That is because a DIV is a container. It is small because you gave it no shape or definition. Additionally, you didn't place anything inside it that would force it to stretch beyond its usual boundaries.
Do I need it on my page?
Will I lose any functionallity without it?
Once you start laying stuff out, yeah you do need it. That is its purpose.
Is there an authoritative site about these types of elements?
Thanks
If you want their definition and properties, use http://msdn.microsoft.com
If you want a tutorial, get a book or find an online tutorial. Like was just previously said, DIV is part of basic HTML.
I will probably come of as chaffe, but to me, it sounds like you are putting the cart before the horse. You should really know HTML before you attempt to tackle ASP of any variety.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Apr 28th, 2006, 10:54 PM
#7
Thread Starter
Hyperactive Member
Re: DIV question - the big one
Touche.
But the author of the book said that the only prerequisite for the book was a "Basic knowledge of HTML". I've got that. Even though the last time that I dabbled in it was 4 or 5 years ago, Back before I found FrontPage. But I still remember a little.
I thought I could rely on the VS editor to take care of that end of it. But I've already had to open of the HTML view several times and repair the IDEs goofs. And now I can see that there are a few more elements to it.
However I'm not looking for a masterpiece. I just want to build a page that gets the job done for my users. They just want the end result with no hassle and if I can't produce that for them they take matters into their own hands, as in pick up a piece of paper and do it by hand. And that makes for a lot of unhappy people.
Anywho so the white page with text and controls on it is just ducky for what I want to do right now since I have a full set of users aready that just want to be done with my app as soon as they can. 
Thanks again for the info
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|