Quick Stylesheet Query

MausMaus Join Date: 2002-11-03 Member: 5599Members
edited January 2005 in Off-Topic
I'm finally starting to put the webspace I bought a year ago to use, and I have just a wee problem with translating my design into code.

What I have so far (and this is early, and the text is naturally all just placeholdery) is this: <a href='http://www.tangledslinky.org/main2.htm' target='_blank'>http://www.tangledslinky.org/main2.htm</a>

If you scroll down you'll see that the blue block on the left stops abruptly after one screen height, and I want it to extend down the whole page, no matter how long the page might be. In the stylesheet, its code is just:

#blueblock {
position: absolute;
height: 100%;
width: 50%;
background-color: #6ac
}

(the white part on the left of the page is a block lying over this blue block)

What could I do to get the effect I want?


(edit: hmm, I see IE doesn't like my image code - it doesn't matter though, all I am asking about here is the blue block)

Comments

  • LegionnairedLegionnaired Join Date: 2002-04-30 Member: 552Members, Constellation
    edited January 2005
    You could make the background of the whole page a 1px tall .gif, with that color blue X pixels across.

    You'd align this to the left, set the tile to vertical only, and set the background color to white.

    EDIT: I use this effect on a page I was working on, <a href='http://lunixmonster.org/hosted/legionnaired/Template.htm' target='_blank'>here.</a>
  • MausMaus Join Date: 2002-11-03 Member: 5599Members
    Oops, yes. I thought of that myself but I'd much rather do it with code - I want people to be able to customise the colour later (basically to teach myself about cookies). <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile-fix.gif' border='0' style='vertical-align:middle' alt='smile-fix.gif' /><!--endemo-->
  • LegionnairedLegionnaired Join Date: 2002-04-30 Member: 552Members, Constellation
    I don't think there's a way to do it with code.

    You might be able to rig up a .php script that chooses which .gif to process, but you'd have to seek out Fam or DOOManiac.
  • MausMaus Join Date: 2002-11-03 Member: 5599Members
    Fam solved it in IRC for me, with a wide transparent gif.

    Guess this can be locked now then.
  • twoflowtwoflow Singing Drunk Join Date: 2002-11-01 Member: 1950Members, Constellation
    edited January 2005
    Oh, no, it doesn't. Nevermind!
  • FamFam Diaper-Wearing Dog On A Ball Join Date: 2002-02-17 Member: 222Members, NS1 Playtester, Contributor
    For anyone who wants to know, this is the way I would to do it:

    Make a wide 1px high gif image, where the right half is white, and the other half is transparent. Set this image as the background image of the body, repeat vertically, and align it top center.

    Set the background color of the body to the colour needed.

    Of course, it is possible to make things 100% height, but it can be tricky. And Internet Explorer will probably screw it all up, but what else would you expect from IE? Its even easier if you can use display: table;, but IE and friends don't support that either.
  • twoflowtwoflow Singing Drunk Join Date: 2002-11-01 Member: 1950Members, Constellation
    edited February 2005
  • twoflowtwoflow Singing Drunk Join Date: 2002-11-01 Member: 1950Members, Constellation
    edited February 2005
    Nevermind, sorted now.
Sign In or Register to comment.