Multiple Background Colors for HTML

Discussion in 'HTML & Website Design' started by Guitarhermit, Jan 15, 2013.

  1. #1
    Hi, I'm doing a project in communications technology about building an html site.

    I would be really greatfull if someone could tell me the code in html to have multiple color backgrounds as soon as possible as my project is due in about 23 hours.

    An example of what I want would be:

    Grey bar background (30% of page)
    White block background (50% of page)
    Black bar background (20% of page)

    I would like to have text over these which is why I want them to be backgrounds

    Thank you very much for your time to read this.
     
    Guitarhermit, Jan 15, 2013 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    You would need two or three separate elements to do that -- probably what's called a min-height layout so it doesn't look goofy on larger displays... it's generally a bad idea to do % of screen heights since screens are not the same heights -- which pretty much means you're thinking is flawed before you even build code... particularly if you are going to have text over them. Each section should be dynamic in height so it can adjust dynamically to the content...

    ... and without seeing the content, or at least a reasonable facsimile, one really has no business building markup or applying style too it.
     
    deathshadow, Jan 15, 2013 IP
  3. Guitarhermit

    Guitarhermit Member

    Messages:
    63
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    43
    Digital Goods:
    3
    #3
    Hmm, then would it be possible for me to just create a black boarder-like effect on the screen? As in DP has this as well if you look on either sides of your screen, there are 2 grey columns. I'm hoping to change it to something of that effect. No text, just a nice border.

    Thanks for your reply.
     
    Guitarhermit, Jan 15, 2013 IP
  4. goliath

    goliath Active Member

    Messages:
    308
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #4
    I think what you're talking about - the grey columns - is actually just a gray background. The forum content up on white divs.

    I didn't try to read the CSS to make sure though ^^

    That's just the normal way.
     
    goliath, Jan 15, 2013 IP
  5. Guitarhermit

    Guitarhermit Member

    Messages:
    63
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    43
    Digital Goods:
    3
    #5
    Sorry, I'm still new to this so i'm basically asking to be spoon fed. Do you mind giving me a basic script for this in html? I'm working in notepad and this is a high school project after all so even basic scripts will suffice.
     
    Guitarhermit, Jan 16, 2013 IP