Hi, I'm very new to CSS, and I'm trying to code my first template together. I've run into a snag I believe though. Basically I have 3 boxes that I want side by side together that span 760 pixels. I've written the code for them but I think something is wrong with my float not centering? Here's my code so far, maybe someone can tell me what I'm doing wrong? #leftbar { background: blue; float: left; width: 259px; } #middlebar { background: darkgreen; float: center; width: 228px; } #rightbar { background: green; float: right; width: 273px; }
Wait, nevermind, I think that I figured it out. I just changed center to left. Is this the correct way to do it?
center is not an attribute of float, only left and right. And these should help you learn: http://www.code-sucks.com/css layouts/
Thanks for the link, I'll fool around with it later. I'm running through a tutorial and my template is differently set up that theirs so I just hit a snag at that point, but some trial and error fixed it. I simply made the center one left and it's working out. Thanks again for the help. If I run into any more problems I'll post them in here so I don't spam the whole board up. Thanks!
I've got another BIGGER issue. I can't get any images to show up when I try to put them in place. Here's the code I'm using for my header and it's just not working: #main-nav { height: 54px; background-image: url("/images/headers/header.gif"); } Any idea what I'm doing wrong here? I've tried on the other images too and I can't get it to work.
Or at least, if nothing shows up after you've loaded the page to the server, try to view the images directly. This always helps me catch when I either forgot to upload the images, or misspelled their names, or put them somewhere else.