Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
why do we use <div> , apdiv, or a div in a css. ? instead of just placing elements.
Old 09-08-2008, 01:05 AM why do we use <div> , apdiv, or a div in a css. ? instead of just placing elements.
Webmaster Talker

Posts: 611
Trades: 0
why do we use <div> , apdiv, or a div in a css. ? instead of just placing elements. my book has me separating page elements into div blocks, but im not sure why. and ap divs in dreamweaver can go over anything, pretty cool, and you can specify divs in an external or internal css style, but im not sure why we do these things instead of just placing images and text where they are by themselves. any help greatly appreciated. thanks. derek.
silverglade is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-08-2008, 04:58 AM Re: why do we use <div> , apdiv, or a div in a css. ? instead of just placing element
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
<div>s are elements. Everything that uses <name [attribute_list]> & </name> as demarcation points are elements. Some elements are "self closing" and use <name [attribute_list] >|/> .

do we assume that by "apdiv" you are referring to an absolutely positioned element that is constructed using <div></div> tags?

It sounds like you skipped a few pages that dealt with the terminology of HTML and CSS

A <div> is a division element. It is a demarcation of an area of the document that can be assigned different properties (styles) from the elements around it.

absolutely positioned elements (of ALL kinds) are removed from the document flow so do not affect other elements in the document.

Normally you would "just place images and text where they are" and allow the document flow to take care of how they behave. Just that sometimes you have to (or want to) affect the natural flow to position elements differently.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-08-2008, 07:52 AM Re: why do we use <div> , apdiv, or a div in a css. ? instead of just placing element
Webmaster Talker

Posts: 611
Trades: 0
if i was going to position a picture to the right hand left hand side with text around it, inside a div , the book has me do this. why do i have to do that when i can just put in the picture and wrap around the text without a div. i think he could have done the whole page without divs actuallly, im still not sure why someone would use a div, except when you want to change the background color to something different than is already there around it. thanks for answering my post about backgrounds by the way. also, do you use a div in an external css to be able to quickly make similar pages to the one with the divs in it? derek

Last edited by silverglade; 09-08-2008 at 08:02 AM..
silverglade is offline
Reply With Quote
View Public Profile
 
Old 09-08-2008, 10:19 AM Re: why do we use <div> , apdiv, or a div in a css. ? instead of just placing element
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Well, to make any page, you need containers of some kind. You can use many type of things, but <div>s are usually best, because they are just generic block-elements that are designated to be used as all-purpose containers. Assuming you know how to style them correctly, you could, in theory, build a site out of almost anything, say, <ul>s and <li>s, or <dl>s and <dt>s, <dd>s. Of course, it would be silly to do so.

Until you understand HTML (and CSS) a bit better, I would do the examples in the book. Even if they aren't perfect examples, it will be good to get familiar with HTML structure so that you are comfortable working in its environment.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 09-08-2008 at 10:21 AM..
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-08-2008, 11:19 AM Re: why do we use <div> , apdiv, or a div in a css. ? instead of just placing element
Webmaster Talker

Posts: 611
Trades: 0
ok thank you very much . derek
silverglade is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to why do we use <div> , apdiv, or a div in a css. ? instead of just placing elements.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15138 seconds with 12 queries