Skip navigation
Bartone
Currently Being Moderated

color bar across top, stretch to edge?

Mar 8, 2011 7:07 PM

wondering what code is required to 'tile' a color bar or two across the page (L to R) to match the size of the window. Also, the length, if that's variable.How big should the color file (png? or jpeg?) be?

 

Thanks,

L bartone

 
Replies
  • Currently Being Moderated
    Mar 8, 2011 8:01 PM   in reply to Bartone

    You can set a div and then you can use css to style it.

     

    call your div (scretch) stretch and apply a style to that div(stretch)  that is 100% wide by however high and with the colour you need.

     

    Otherwise create a tiny gif that is the height you need but only say 5 pixels wide and then style this so it repeats y (I can never remember if it is y or x axis for width)

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2011 11:13 PM   in reply to Bartone

    The following is to show how to get a full width header and footer. It is not meant as an illustration on how to style a complete document.

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <style>
    html {
        background: #CCC;
        height: 100%;
    }
    body {
        height: 100%;
    }
    #header {
        background: #060;
        height: 200px;
        text-align: center;
        color: #999
    }
    #nav {
        background: #333;
        height: 35px;
        width: 960px;
        margin: auto;
    }
    #article {
        background: #FFC;
        width: 960px;
        margin: auto;
    }
    #footer {
        background: #060;
        height: 70px;
    }
    </style>
    </head>

    <body>
    <div id="header"><h1>This is the full width header</h1></div>
    <div id="nav"></div>
    <div id="article">
        <p>To ensure that non-operating cash outflows are assessed. The components and priorities for the change program highly motivated participants contributing to a valued-added outcome. While those at the coal face don't have sufficient view of the overall goals. To focus on improvement, not cost, building flexibility through spreading knowledge and self-organization, whether the organization's core competences are fully in line, given market realities. By adopting project appraisal through incremental cash flow analysis, combined with optimal use of human resources, quantitative analysis of all the key ratios has a vital role to play in this.</p>
      <p>The new golden rule gives enormous power to those individuals and units, highly motivated participants contributing to a valued-added outcome. Measure the process, not the people. Exploiting the productive lifecycle by moving executive focus from lag financial indicators to more actionable lead indicators, through the  adoption of a proactive stance, the astute manager can adopt a position at the vanguard. The components and priorities for the change program highly motivated participants contributing to a valued-added outcome.</p>
    </div>
    <div id="footer">
      <h3>This is the full width footer</h3>
    </div>
    </body>
    </html>

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 9, 2011 12:21 PM   in reply to Bartone

    Liquid Header & Footer demo  (view source to see the code).

    http://alt-web.com/TEMPLATES/I-page-with-floats.shtml

     

    To add a horizontal-repeat to your background image with CSS:

     

    #header {

    background: url(your-BG-image.jpg) repeat-x;

    }

     

     

     

    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points