ownage Posted December 9, 2006 Share Posted December 9, 2006 i think i could have seen this in the tutorial although while browsing for it i can't find it. any way what do they do and how do i use em. Link to comment Share on other sites More sharing options...
real_illusions Posted December 9, 2006 Share Posted December 9, 2006 http://www.w3schools.com/tags/tag_div.asp Link to comment Share on other sites More sharing options...
quackquack Posted December 10, 2006 Share Posted December 10, 2006 div = divisionDescription: Div is used for a division in a document. Link to comment Share on other sites More sharing options...
ownage Posted December 12, 2006 Author Share Posted December 12, 2006 isnt that the same as <span></span> i see people using them for tables and stuff, why not just use the table elements or the header elemetns? whats the benifet Link to comment Share on other sites More sharing options...
jlhaslip Posted December 12, 2006 Share Posted December 12, 2006 <span> is an in-line element and <div> is a block-level element. Use spans inside of div's.Tables are not designed to structure a page, although they do work for that. Do it however you want, but there are distinct advantages to div's and css. File size and speed of loading for one thing. Tables are bulkier and take longer to load. They are more difficult to modify. Link to comment Share on other sites More sharing options...
ownage Posted December 12, 2006 Author Share Posted December 12, 2006 can u give me some elements u can stick inside it? Link to comment Share on other sites More sharing options...
real_illusions Posted December 13, 2006 Share Posted December 13, 2006 i suggest you read through the tutorials, as most of your answers can be found in there.start at this page, and work your way through ithttp://www.w3schools.com/html/html_intro.asp Link to comment Share on other sites More sharing options...
skaterdav85 Posted February 14, 2008 Share Posted February 14, 2008 does anyone know how to take the whole division <div>......</div> and center it? I tried align="center" and that didnt work. any tips? thanks! Link to comment Share on other sites More sharing options...
justsomeguy Posted February 14, 2008 Share Posted February 14, 2008 A div is a block-level element by default, which stretches 100% width, so if you want to center it you'll need to reduce the width so that the div is smaller then it's container. Then you can use auto margins to center the div inside its container.<div style="width: 500px; margin: 0 auto;"> Link to comment Share on other sites More sharing options...
jeffman Posted February 14, 2008 Share Posted February 14, 2008 You need too much darned syntax for a table.<table><tr><td>content</td></tr></table>COMPARE:<div>content</div> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now