Right so, in school I'm taking a computer class and right now we're doing HTML with Dreamweaver. I'm sure if anyone can help me, but if they can it'd be great. Pretty much, I'm suppose to make a table to look like a calender. Except it isn't working for me, and no one can find the problem. If anyone could point it out to me, I'd love them forever. ;3
Spoiler: Dreamweaver HTML Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Les Tableaux et les Couleurs</title> </head>
The problem is that instead of being centered, and seperated. It shows up just in one lign.
------------------- “We are all a little weird and life’s a little weird, and when we find someone whose weirdness is compatible with ours, we join up with them and fall in mutual weirdness and call it love.”
There were a few syntax errors - you missed a few " around certain things, and you're using deprecated coding. I changed the <center> to <div> with a style and it started working immediately ;D
------------------- “We are all a little weird and life’s a little weird, and when we find someone whose weirdness is compatible with ours, we join up with them and fall in mutual weirdness and call it love.”
Ok I just spaced it out a little more so it's easier to read ;D
Also! I fixed some of the deprecated coding, coding that will no longer work in the future, along with coding that really isn't needed, and replaced them with styles. That <style type="text/css"> thing is an internal stylesheet.
So for an example...
code
th {
width:14%;
}
Everything inside the 'th' element is going to have a width of 14%.
code
table {
width:250px;
}
Everything inside the 'table' element is going to have a width of 250px.
Do you understand that part?
Then you can also make your own, which is what I did with #head. You can make it anything, really, but you should make it something that makes sense for what you're gonna use it for. You put # in front of the word and that makes it an ID. Or you can put ' . ' in front of it, like .head and it'll make it a class. IDs can be used once on a page, classes can be used as many times as you want.
The #head ID will have a background color of aqua and it'll be centered.
Then you have to say which part of the code will be used for #head.
code
<tr id="head">
<th colspan="7">J U I L L E T 2 0 0 1</th>
</tr>
So you say "this tr ID is head," and notice that you don't carry over the #.
If you took away id="head" then everything inside that small section isn't going to be aqua or centered - unless you have the whole page centered (which we do) so technically you don't even need the centered alignment there.
Basically all of this is just giving you less code and it's doing the same thing - and it's also making it cleaner and easier to read =D So now if you ever want to change all of your background colors or anything, ALL you have to do is change the CSS and it'll change ALL of them for you instead of you having to go in and specify every single one by hand.
Also!
code
<body bgcolor="#FFFFFF" text="#000000>
You don't need to do this because, by default, the background is always white and the text is always black =D
I'm gonna warn you that some of the codes might not be 100% correct, or there might be better ways to do them ;D I don't really work with tables at ALL so I'm not *completely* sure how they function, but what I said about classes/IDs/how to do it should work just fine.
Alright, I think I understand all of that. Thanks again, it's really helped me out. :3
------------------- “We are all a little weird and life’s a little weird, and when we find someone whose weirdness is compatible with ours, we join up with them and fall in mutual weirdness and call it love.”