Jump to content

Correcting Height


N-Bomb(Nerd)

Recommended Posts

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;
}

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.