Follow us on Twitter!
It is never to LATE to become what you never WERE.
Thursday, April 17, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 17
Guests Online: 16
Members Online: 1

Registered Members: 82822
Newest Member: TheBunter
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

css not applying to page


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 13-01-08 04:58
Hello everyone,

I am new to html and css. I have been doing it for about 3 weeks.
I am learning a lot but there's a lot I don't yet understand.
I'm trying to make a calendar for January with the weekdays, weekends, and holidays each in separate colors.

Also, the number for the date should be in the upper right corner of the cell and the name of the holiday should appear in the center of the cell. With just html I got it perfect, exactly how I need. I have a book and I have been visiting w3schools. I just need a little help from someone who understands css.
This is what I have so far:

<html>

<head>
<title>Calendar</title>


<style type="text/css"

p.holiday { text-align: center;
}


td { color: #ff0000;
background-color: 000ff;
}

td.holiday { color: #ff6600;
background-color: ff0ff;
}


td.weekend { color: 0ff00;
background-color: #ff00ff;
}

tr { height: 80px;
text-align: right;
vertical-align: top;
width: 150px;
}

</style>

</head>

<body>

<table align="center" border="1" cellspacing="1" cellpadding="1" summary="January">

<caption>January</caption>
<th>Sunday</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>

<tr>
<td class="weekend"> </td>
<td> </td>
<td class="holiday">1<p class="holiday">New Year's Day</p></td>
<td>2</td>
<td>3</td>
<td>4</td>
<td class="weekend">5</td>
</tr>

<tr>
<td class="weekend">6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td class="weekend">12</td>
</tr>

<tr>
<td class="weekend">13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td class="weekend">19</td>
</tr>

<tr>
<td class="weekend">20</td>
<td class="holiday">21<p class="holiday">Martin Luther King</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td class="weekend">26</td>
</tr>

<tr>
<td class="weekend">27</td>
<td>28</td>
<td>29</td>
<td>30</td>
<td>31</td>
<td> </td>
<td class="weekend"> </td>
</tr>
</table>
</body>
</html>


None of the formatting appears when I view the page. What am I doing wrong?

Thanks in advance for any help.
Author

RE: css not applying to page

spyware
Member



Posts: 4192
Location: The Netherlands
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 13-01-08 05:00
Check your opening-style tag.



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
“Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?” - Ebert
[/s
http://bitsofspy.net
Author

RE: css not applying to page


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 13-01-08 05:52
spyware wrote:
Check your opening-style tag.


Agreed. Unless you typo'd, you forgot a ">".



Author

RE: css not applying to page


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 13-01-08 06:17
close tag in the beginning
. to td ???
. to tr ???
<style type="text/css">

p.holiday { text-align: center;
}


td. { color: #ff0000;
background-color: 000ff;
}

td.holiday { color: #ff6600;
background-color: ff0ff;
}


td.weekend { color: 0ff00;
background-color: #ff00ff;
}

tr. { height: 80px;
text-align: right;
vertical-align: top;
width: 150px;
}

</style>




Edited by on 13-01-08 06:18
Author

RE: Thanks.


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 13-01-08 14:46
The missing '>' was a typo on my part. I guess I was reading right over that. Thanks.

With that, I thought that I probably made other typos, and I did.

Sometimes you need a fresh set of eyes. Thanks for the help.