Forum Moderators: not2easy
Year
Month: Event
Month: Event
Month: Event
Year
Month: Event
Month: Event
Month: Event
In the Year section, there is a background color that I would like to have extend the full width of the content area, not just the text. I tried putting the width of the class at 100% and that didn't work... any other ideas?
Jennifer
<style>
#content {
border: 3px #307d7e solid;
float: left;
width: 75%;
margin-left: 30px;
background-color: #aaaaaa;
padding: 5px;
}
.bodyMenu {
color: #000000;
font-family: "Times New Roman", Times, serif;
font-size: 18px;
font-weight: bold;
background-color: #307d7e;
}
</style>
<div id="content">
<span class="bodyMenu">1994</span><br />
January: event <br />
<br />
<span class="bodyMenu">1995</span <br />
March: event <br />
August: event <br />
...
</div>
Jennifer
I see a couple things:
- add "width:100%;" to your .bodyMenu for the year span, and I think you'll get what I think you're looking for (I tried it in IE6, and it worked)
- your 2nd span tag isn't closed, but that's probably not an issue here
- keep in mind that a span is inline and a div breaks a line. You might bear this in mind and possibly avoid having to throw in a <br> (preference, I guess).
hope this helps
I did try width: 100%; and it didn't work in Opera 7.11, but I didn't try it in IE.... I'd like something that would work in Opera too.
And good point with the div/br thing, I'll change that later, but have to go to work now....
Jennifer
I ran your code thru and keep getting "You have no color with your background-color : #content" for CSS2. I tried quotes and apostrophes around #aaaaaa, but it just doesn't want to take. Maybe that's a clue?
Didn't want to leave you hanging-- just to say I hope someone else is still monitoring this thread! I'm an IE web apps developer. Good luck.
As for the background color, maybe it doesn't like that style and I should find the number equivalent (sorry, I don't remember the "real" name) of it?
Anyway, I did find something that worked... I took out the width: 100%; and put in display: block; and it works great. Thanks for the help. :)
Jennifer