N-Bomb(Nerd) Posted June 20, 2009 Share Posted June 20, 2009 I've agreed to help somebody with a website, however I wasn't aware how much of a b*tch xhtml/css was. I'm easily able to do php work, and I can even do some photoshop work. However, I'm horrible at xhtml/css.. I've created a simple layout using random colors for the background to get an understanding of everything. However, my sidebar doesn't want to stay at the same length of my main content. Example: http://img29.imageshack.us/img29/966/layoutn.png What would I be doing wrong? Here's my html code: <div id="Container"> <div id="tBar">Red</div> <div id="mBar">Blue</div> <div id="rContent">Shorty..</div> <div id="lContent"> They say you're nobody til somebody kills you<br> But where I'm from you're nobody til you kill somebody<br> And you kno what they say<br> When you're great it's not murder it's assinate<br> So assinate me bitch<br> Cause I'm doin the same shit martin luther king did<br> Checkin in the same hotel in the same suite bitch same balcony<br> Like assinate me bitch<br> </div> <div id="Footer">Yellow</div> </div> CSS Code: html, body, div, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; } #Container { border: 1px solid black; margin: auto; width: 760px; } #tBar { background-color: red; height: 70px; } #mBar { background-color: blue; height: 200px; } #rContent { background-color: green; float: right; width: 150px; } #lContent { background-color: purple; float: left; width: 610px; } #Footer { background-color: yellow; clear: both; height: 50px; } Quote Link to comment https://forums.phpfreaks.com/topic/163017-correcting-height/ Share on other sites More sharing options...
SuperBlue Posted June 28, 2009 Share Posted June 28, 2009 Its not that hard to understand you are stuck, really. What you want to do is some of the hardest to do with CSS, not to say impossible. You are actually better left using a table based layout for something like that. Otherwhise you end up doing some really crazy faking of the backgrounds, like done in Equal Height Columns using Floats Quote Link to comment https://forums.phpfreaks.com/topic/163017-correcting-height/#findComment-865135 Share on other sites More sharing options...
TheFilmGod Posted June 29, 2009 Share Posted June 29, 2009 faux columns. Quote Link to comment https://forums.phpfreaks.com/topic/163017-correcting-height/#findComment-865318 Share on other sites More sharing options...
haku Posted June 29, 2009 Share Posted June 29, 2009 Being able to do PHP without knowing HTML is almost pointless. Since the overall goal of php is to output HTML, not knowing what HTML to output is like trying to build a puzzle when you have no idea what the final image should look like. If you are working hand in hand with a designer who provides you with the HTML to output, there is no problem, but anytime you are working on something without having been provided with the HTML, you are pretty much out of luck. So I would suggest taking a month or two and learning how to write standards-compliant HTML, and hopefully some CSS to match. You don't need to be a master at it, but you should at least have a solid understanding. Quote Link to comment https://forums.phpfreaks.com/topic/163017-correcting-height/#findComment-865351 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.