Coding a website clean & valid |
Coding a website clean & valid |
Sep 17 2009, 01:20 PM
Post
#1
|
|
|
Member ![]() ![]() Group: Member Posts: 10 Joined: Oct 2008 Member No: 693,488 |
Hey everyone,
I recently started my upcoming portfolio in Photoshop using a grid system recommended by Psdtuts.com. Anyways, once I finish that, I wanna be able to code the website in html/css in the best way possible. I understand most of the concepts, but some I don't. I'd like the code to be clean, and meet up to wc3 standards. To be completely honest, I really don't know how to do this. Whenever I code, it's usually "hacked" or just easy fixes that lead to bad, unstructured code that looks kinda good in one browser. I'd love for this change, but I've been unable to find a nice tutorial on doing this. I don't quite understand how you can code the whole html as one thing, and then style it. Usually I would do EVERYTHING in divs. About section, a div position:absolute. I feel this is wrong. One of the biggest things I don't understand is the padding attribute. No idea what it does. I'd love to be able to code this upcoming website in a clean, valid format. Createblog hasn't let me down yet. What does everyone suggest? Thanks, Henry |
|
|
|
![]() |
Sep 17 2009, 03:33 PM
Post
#2
|
|
![]() Live long and prosper. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 10,142 Joined: Apr 2007 Member No: 514,926 |
Using div's isn't wrong. But the way they are used 90% of the time is. There are a lot of useful tutorials for converting a PSD to an XHTML/CSS document. Padding and margin kinda do the same thing.
QUOTE However, "the margin provides space between your element and other elements, while padding gives you extra space around your content. If you have a visual border, the padding is on the inside of the border and the margin on the outside. Think of padding as part of the element, while the margin surrounds your element and buffers it from the things around it."
- Head First HTML with CSS & XHTML |
|
|
|
henrybayuzick Coding a website clean & valid Sep 17 2009, 01:20 PM
allvanishing Coding with DIVs isn't wrong, it's just th... Sep 17 2009, 09:19 PM
jordanriane There is nothing wrong with using DIVs but you nee... Sep 19 2009, 08:53 PM
henrybayuzick Thanks to everyone who replied! I'm going ... Sep 23 2009, 07:08 PM![]() ![]() |