PDA

View Full Version : CSS and divs!



font
18-05-2007, 04:36 PM
Hi :)

I use tables for my layouts, but I want to learn to code with CSS & divs! If anybody could provide a tutorial or a link to a tutorial I would be grateful! :D

font

Tomm
18-05-2007, 04:45 PM
www.w3schools.com

font
18-05-2007, 04:49 PM
Thanks, I can't find anything on divs :(

Keep posting! :)

Aflux
18-05-2007, 07:00 PM
Thanks, I can't find anything on divs :(

Keep posting! :)
w3schools is all you'll ever need.

font
18-05-2007, 07:03 PM
w3schools is all you'll ever need.You sure? :D Hopefully... I can't seem to find the section on divs. :(

Aflux
18-05-2007, 07:07 PM
You sure? :D Hopefully... I can't seem to find the section on divs. :(
Read through (x)HTML and then read through CSS on how to style a div.

There's no specific section for divs...

font
19-05-2007, 08:06 AM
OK, thanks very much Aflux and Tomm!

Sygon..
19-05-2007, 11:17 AM
Basics:

Div tag - <div></div>

To give a propertie(SP) to a div - <div id='hi'></div> or <div class='hi'></div>

Difference between id and class is that class can be reffered to more than once where id cannot.

So to give the div style, in your style sheet.

For the ID

#hi { background: white; }

or for class

.hi { background: white; }

font
19-05-2007, 11:38 AM
Thanks sygon..! If you have time, could you write a tutorial on using divs instead of tables? :) You seem like a good coder!

Blob
19-05-2007, 11:47 AM
Basics:

Div tag - <div></div>

To give a propertie(SP) to a div - <div id='hi'></div> or <div class='hi'></div>

Difference between id and class is that class can be reffered to more than once where id cannot.

So to give the div style, in your style sheet.

For the ID

#hi { background: white; }

or for class

.hi { background: white; }

Property

Anyway your best to look at examples and then copy sniplets from there to try and learn from

L?KE
19-05-2007, 11:48 AM
If not get a book..?

DJ-Vimto
22-05-2007, 02:45 AM
if you have dreamweaver, look at some of the CSS templates that come with it.

you should be able to learn a bit about divs from that :)

i would also suggest buying a book on dreamweaver aswell, it will help a lot

Want to hide these adverts? Register an account for free!