|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Banned
|
I'm working on a simple layout in CSS (for the 1st time) and I have a slight bug. The "left" DIV background color doesn't seem to be working...it's suppose to be white, but it takes on the #333333 of the "body" background-color ....not sure what's going on?
Here's the full code: HTML Code:
<html> <head> <style type="text/css"> body { margin: 5px 0px 0px 20%; background-color:#333333; } /* MENU START */ ul { float:left; width:90px; padding:0; margin:0; list-style-type:none; } a.MENU { float:left; width:90px; text-decoration:none; text-align:left; color:#000000; background-color:#ffffff; padding:5px, 0px, 5px, 5px; border-right:1px solid white; } a.MENU:hover { background-color:gray; color:#ffffff; } /* MENU END */ #Content { font-family: Verdana, Arial, Helvetica, sans-serif ; font-size:11px; text-align:left; line-height:1.8; padding:10px; margin-left:15%; border-left:1px solid #000000; background-color:#eee; } div.container { width:75%; margin:0px; border:1px solid #000000; } div.header { border-bottom:1px solid #000000; padding:0.5em; color:white; background-color:gray; clear:left; } div.footer { font-family: Verdana, Arial, Helvetica, sans-serif ; font-size:11px; text-align:center; border-top:1px solid #000000; padding:0px 0px 0px 5px; color:white; background-color:gray; clear:left; } h1.header { padding:0; margin:0; } div.left { background-color:#FFFFFF; float:left; width:90px; height:100%; margin: 0px 0px 0px 0px; padding:none; } </style> </head> <body> <div class="container"> <div class="header"><h1 class="header">Main Title</h1></div> <div class="left"> <ul> <li><a href="#" class="MENU">Home</a></li> <li><a href="#" class="MENU">Services</a></li> <li><a href="#" class="MENU">Portfolio</a></li> <li><a href="#" class="MENU">Staff</a></li> <li><a href="#" class="MENU">Contact</a></li> </ul> </div> <div id="content"> <h2>Free cookies! Come now!</h2> <p>Ok, we're not really giving out free cookies.. that was just a marketing scheme to pull all the stupid people in... looks like it worked, because here you are! Now, send us $10,000,000 US currency. Please? Thank you, it's greatly appreciated.</p> <p>TheCookie Factory, Inc.</p></div> <div class="footer">Copyright © 2005 TheCookie Factory</div> </div> </body> </html> Hope you can help. Btw, if I were to add the: HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Thanks. |
|
|
|
|
|
#2 |
|
Chop Chop
|
Instead of making the divisions 'div.something', just make them '#something'. So then, in the HTML part, instead of 'div class="something"' it would be 'div id="something"'. Not sure if that will work, but give it a try.
PS Be sure to use the chevrons (< and >), I didn't put them in, sorry. |
|
|
|
|
|
#3 |
|
Banned
|
Same exact thing man in IE. But Firefox and Netscape 8.0, the left column extends about 1000px straight down...its white though
lol.More bugs...I hate bugs. Anymore ideas?
|
|
|
|
|
|
#4 |
|
Banned
|
correction....its the same in all browsers. That bug was caused by something else. But the background color is still unsolved.
|
|
|
|
|
|
#5 |
|
Chop Chop
|
Are the links supposed to be going across the top or side? If you want them on the side, just remove all the list tags.
|
|
|
|
|
|
#6 |
|
Banned
|
they are suppose to be vertical...and they are... the links aren't my problem, the background is....
|
|
|
|
|
|
#7 |
|
Chop Chop
|
Well, with the way you had it, I see only two links, horizontal. The background looks fine to me. I don't know if this is waht you want.
HTML Code:
<html> <head> <style type="text/css"> body { margin: 5px 0px 0px 20%; background-color:#333333; } /* MENU START */ ul { float:left; width:90px; padding:0; margin:0; list-style-type:none; } a.MENU { float:left; width:90px; text-decoration:none; text-align:left; color:#000000; background-color:#ffffff; padding:5px, 0px, 5px, 5px; border-right:1px solid white; } a.MENU:hover { background-color:gray; color:#ffffff; } /* MENU END */ #Content { font-family: Verdana, Arial, Helvetica, sans-serif ; font-size:11px; text-align:left; line-height:1.8; padding:10px; margin-left:15%; border-left:1px solid #000000; background-color:#eee; } div.container { width:75%; margin:0px; border:1px solid #000000; } div.header { border-bottom:1px solid #000000; padding:0.5em; color:white; background-color:gray; clear:left; } div.footer { font-family: Verdana, Arial, Helvetica, sans-serif ; font-size:11px; text-align:center; border-top:1px solid #000000; padding:0px 0px 0px 5px; color:white; background-color:gray; clear:left; } h1.header { padding:0; margin:0px; } div.left { background-color:#FFFFFF; float:left; width:91px; height:100%; margin: 0px 0px 0px 0px; padding:0px; } </style> </head> <body> <div class="container"> <div class="header"> <h1 class="header">Main Title</h1> </div> <div class="left"> <a href="#" class="MENU">Home</a> <a href="#" class="MENU">Services</a> <a href="#" class="MENU">Portfolio</a> <a href="#" class="MENU">Staff</a> <a href="#" class="MENU">Contact</a> </div> <div id="content"> <h2>Free cookies! Come now!</h2> <p>Ok, we're not really giving out free cookies.. that was just a marketing scheme to pull all the stupid people in... looks like it worked, because here you are! Now, send us $10,000,000 US currency. Please? Thank you, it's greatly appreciated.</p> <p>TheCookie Factory, Inc.</p> <h2>Free cookies! Come now!</h2> <p>Ok, we're not really giving out free cookies.. that was just a marketing scheme to pull all the stupid people in... looks like it worked, because here you are! Now, send us $10,000,000 US currency. Please? Thank you, it's greatly appreciated.</p> <p>TheCookie Factory, Inc.</p> </div> <div class="footer">Copyright © 2005 TheCookie Factory</div> </div> |
|
|
|
|
|
#8 |
|
Banned
|
this red box in this picture should be white. That's all I need.
|
|
|
|
|
|
#9 |
|
Chop Chop
|
I think thats an IE thing. It works in FF until the content section becomes bigger than the left section.
|
|
|
|
|
|
#10 |
|
Banned
|
I'm not sure if you just gave me a fix to the problem, or....what?...
|
|
|
|
|
|
#11 |
|
Banned
Join Date: Mar 2005
Posts: 210
|
right open it in Frontpage and change it there
|
|
|
|
|
|
#12 | |
|
Banned
|
Quote:
Alright, there has to be someone in this forum who knows a little CSS ... c'mon guys, please help me out. |
|
|
|
|
|
|
#13 |
|
It can never be too quiet
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
|
Hiya mysterio,
Can you do me a little favor... please post URLs to your .htm page and any seperate pages for .css or anything? That way I can just right click and save as to get the most current versions of whatever you have. Once I have everything reproduced on my drive, I'll play around with it. Not giving any guarantee though.
__________________
Athlon XP 2800+ • Asus A7N8X (nVidia Nforce2) • Radeon 9600 Pro 256MB • 2x512MB KVR DDR PC3200 Dual Channel • 120GB Seagate 7200RPM 8MB • 160GB WD 7200RPM 8MB • Liteon DVD±RW DL • AOpen DVD±RW DL • Vantec Ion2 350W PSUSend me your picture for the Member Photo Gallery |
|
|
|
|
|
#14 |
|
Banned
Join Date: Mar 2005
Posts: 210
|
yeah post them up here and we can toy and c if we can get it
|
|
|
|
|
|
#15 |
|
Member (9 bit)
Join Date: Nov 2004
Location: Flint, MI
Posts: 256
|
In the div.left, change the #FFFFFF in the background to whatever color you want. The white under the links will change to what you picked.
»fo Last edited by foolishone; 08-09-2005 at 02:14 PM. |
|
|
|
|
|
#16 |
|
Banned
|
this may make people angry that tried to help, but that page has been scraped (it was only a css test page)
Now I'm working on an FAQ page for my company which is not going to be scraped (for sure), and I have yet another CSS problem. This one deals with Netscape problems. I'm posting a new thread right now because it is in fact a new topic. And I'll post the .html this time. --Mysterio2099 |
|
|
|
|
|
#17 | |
|
It can never be too quiet
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
|
Quote:
![]() I'll take a look at the new thread when it's up. Stryker
|
|
|
|
|
|
|
#18 |
|
Banned
Join Date: Mar 2005
Posts: 210
|
well this was a waste of time
|
|
|
|
|
|
#19 | |
|
It can never be too quiet
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
|
Quote:
I think both of these posts (your and mine) are a bigger waste of time. |
|
|
|
|
|
|
#20 |
|
Banned
|
I knew someone would be mad
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|