tables and divs

Soldato
Joined
2 Oct 2004
Posts
4,362
Location
N.W London
Hi,

I am learning coding starting of with html coding over at w3c.com and then will go on to xhtml and css...

I am at the stage of learning about html coding for tables...however I remember ppl on this forum saying I should use Divs instead...

Please can someone kindly explain the difference? and advise when I would use a table and when I would use Divs?

Thanks in advance...

Cheers!!
 
so when creating a new website for the layout use CSS??

a div is a CSS tag? is that right?

so for all pages within my site use CSS to define the layout? is that right?

I'm getting soooooo confused between divs and tables you wont believe...

I have seen examples of websites where ppl have used tables for their layout...this is not using tables properly right?
 
right im with you as far as HTML is concerned and I believe I even understand the basics now of CSS ( I said the basics :) )

What I fail to understand is this....

I have to post a site so you guys understand what I mean because I may not explain clearly or you may misinterpret what I am saying...

http://www.hardocp.com/

If you look at their home page, now I realise the background is black (or close to) but you see how they have that table (sorry for using that phrase) in the middle and then all the content within it???

Have they used divs to do that? I looked at the source and I see the div tag left right and centre so I guess they did but I am just double checking?

If yes.....have they basically defined every section of that table to state where they want adverts, texts etc to be placed within it?

How did they create the borders on the left and right handside of the table (sorry to use that word again)? Are the nav buttons just buttons they created in photoshop or fireworks and then they turned them into a link?

Please clarify the above re: divs...

sorry for posting the site but I really needed an example to help clarify my point...


thanks in advance...

btw I am following w3c schools and am finding it very useful and would recommend them to anyone who wants to get into webdesign as a basic starting off point :)
 
thanks for your help...

Does anyone know a good tutorial working with Divs?

I would like to create a test webpage with a box in the middle using Divs and CSS....

W3C teaches you a lot of the properties you can have when using CSS just like it does with HTML and XHTML however I see no reference to Divs on that site...perhaps I am looking in the wrong place...

I know divs have properties such as <div class> and <div container> etc etc but it would be really helpful if I could find a definitive list somewhere....

Please help?

Thanks in advance...

Cheers...
 
yeah at long last hey its back on :)

see I have read through quite a lot of that tutorial especially the part about CSS but it makes no reference to Divs....

Therefore I was looking for a tutorial that does and how to implement them...

Over at W3C you see all the diff attributes you can use for a css style sheet I was hoping they would have the same for Divs....so I can learn what I needed to use Divs wise...

Am I being clear?
 
Now, the attributes you can attach to a DIV (just like every element) vary greatly. the most common ones, are assigning a class and or ID to a DIV.

So for example would this be correct:

<div=subnav> </div>.....where subnav is the name of my sheet?

I think I understand what you mean it would be so great if there was like a tutorial on divs so n00bs like myself would know how to use this element properly just as w3c school have tutorials on html, xhtml, css, javascript etc etc
 
thanks for the link on the tut will come in very handy...

Icraig thats my point like there is div class, div id how many other div properties are available to me? is there a list?

thanks a lot for your advice its proving to be invaluable :)
 
can i clarify that now adays one should not use tables at all for layout purposes and instead should use CSS for layouts which are defined by Divs (i hope that is the correct terminalogy) still learning u see :) ?????
 
hey guys,

thanks for your help so far and all the responses you lot are like a breathe of fresh air...

im following the tutorials over at w3c and hopefully can put something together in a week or so to show you how its coming along...

I have a question I was hoping you guys can help me with pls?

I am at the form stage under HTML section and its getting to a point where there is a lot of coding...

I will never remember it all especially if I dont create a website for a few months after creating my very first one....

So how do you guys manage to remember all the different varities of code? all the diff commands?

Do you save it in text files?

Any tips of doing this the "right way" would be most appreciated....

Cheers guys!!!

:)
 
memorise?

wow......

is that how you all do it? memorise it?

what happens when you dont create a site for ages then need to create one?
 
hey those cheat sheets are great thanks :)

see at the moment I need to create a site...so was reading thru w3c to first understand what the diff bits of code to and their functions and then I would implement it..

However as stated above as Im progessing through the tuts its getting confusing only becuz there is a lot of code atm....and I havent even got to CSS lol

so thought i would ask you guys how you manage to remember all that? I will create about 2 - 3 sites and then wont need to do so for a while in which time I will prob forgot what I learnt...therefore needed some help and clarification on how you guys do it...

Thanks mate...
 
hey thanks for your comments joeyjoe and beansprouts...

thanks for the useful tips beansprouts

fyi joey im learning but at the stage where i dont know enough and am really tempted to create something...lol ......but cannot because I dont know enough...sure I understand basics with html I know what beansprouts is talking about...next stop CSS....

For example 2 days ago I created a header, nav bar, main body and footer using tables added colour and text etc center aligned it and was quite pleased with myself. However deep down I know this is incorrect because I should not use tables for layout. So I have to remain patient read up on CSS and then try and create a layout using CSS and Divs so I learn the proper way.

Also at this stage I have to spend a lot of time reading and implementing what I read so that when I look at webpages I know how things are done and what properties are used. This way not only does editing become a lot easier but I am learning how to use the properties I want/need....

I just have to remain patient but its hard - all theory and no practical makes me a dull guy - which I am not :p

Thanks for the encouragment hopefully I will have something up and running soon and as I get confused I comeback for more clarification at which point you guys offer invaluable advice...

Cheers guys!!!
 
hey thanks for your help very interesting indeed :)

1. I use dreamweaver is that OK?
2. I really didnt know that about firefox but from now on will create whatever I do for viewing in firefox and then change it if req for IE
3. Still learning about divs but points noted..
4. points noted
5. I am working to something at the moment....but as I am also learning about properties and attributes along the way its a lot of info...

Most days my brains are fried...big time...but I guess you all went thru this at some stage...its what happens when one is learning i gather??

thanks for your help mate most appreciated...
 
hey lazy

thanks for your help mate :) most appreciated...

Im now beginning learning CSS and Divs and slowly but surely am trying to get it all to come together so I can create a website and get all your thoughts and comments on it....

Do you know of any good links for CSS and Div layouts so I could take a look at the code and how the creator developed the site etc???

Practice makes perfect so the more I learn and mess around with code the more familiar it will get....what do you guys reckon?

thanks everyone :)
 
appreciate the tips lazy cheers pal ....

I'm using firefox and IE6 to view my site as I develop it...

I find if its aligned perfectly in firefox its not in IE6...

How can I overcome this?

Also does anyone know any good BEGINNER tutorials for flash 8 ????

Or any version of flash?

Would be great if someone knew of something....

Thanks guys....you guys continue to inspire me :)

Most appreciated....
 
Back
Top Bottom