css and borders

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Malfunction

    css and borders

    I've got two classes header and footer. They both have a 2px. border
    to make it appear as a box on top and at the bottom of the page. They
    both have a standard width (respecting the padding property).
    Now I wanted the footer to always apear on the bottom of the page even
    if there's a blank page with only header and footer.
    So I set it to position:absolu te; bottom:12px; moving it to the
    bottom. But now the width of the footer isn't the same anymore but
    just as big as the text it contains.
    To go round this I set it's width property to 100%. But now it only
    respects padding on the left side and not on the right.
    Any suggestions?
  • Jeff Thies

    #2
    Re: css and borders

    > I've got two classes header and footer. They both have a 2px. border[color=blue]
    > to make it appear as a box on top and at the bottom of the page. They
    > both have a standard width (respecting the padding property).
    > Now I wanted the footer to always apear on the bottom of the page even
    > if there's a blank page with only header and footer.
    > So I set it to position:absolu te; bottom:12px; moving it to the
    > bottom.[/color]

    I didn't know you could do that! I'm not sure that is widely supported.
    [color=blue]
    > But now the width of the footer isn't the same anymore but
    > just as big as the text it contains.
    > To go round this I set it's width property to 100%. But now it only
    > respects padding on the left side and not on the right.[/color]

    Well, it's now absolutely positioned. That's a different kind of animal,
    that margins don't apply to. The browser is implying a left: 0px, absolutely
    positioned divs are, well, absolutely positioned. You'll have to style the
    contents of that div. Perhaps another div inside of it.

    Jeff

    [color=blue]
    > Any suggestions?[/color]


    Comment

    • Lauri Raittila

      #3
      Re: css and borders

      In article Malfunction wrote:[color=blue]
      > I've got two classes header and footer. They both have a 2px. border
      > to make it appear as a box on top and at the bottom of the page. They
      > both have a standard width (respecting the padding property).
      > Now I wanted the footer to always apear on the bottom of the page even
      > if there's a blank page with only header and footer.
      > So I set it to position:absolu te; bottom:12px; moving it to the
      > bottom. But now the width of the footer isn't the same anymore but
      > just as big as the text it contains.
      > To go round this I set it's width property to 100%. But now it only
      > respects padding on the left side and not on the right.
      > Any suggestions?[/color]

      Use this:

      right:0;

      You are in wrong group, use ciwa.stylesheet s for CSS questions. And
      google it before.

      Also see




      --
      Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
      Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
      tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

      Comment

      • Malfunction

        #4
        Re: css and borders

        Sorry for being in the wrong group.
        But right:0 doesn't do it. I want padding of 10 on either side. The
        standard streches the box over the whole page until it reaches 10
        pixel from the border.
        Setting right:0 or 10 the box is aligned to the right but having only
        the size of the containing text.

        should look like this:

        ---------------------------------------------------
        |...-------------------------------------------...|
        |...| header with margin on both sides |...|
        |...| but streched over the full remaining |...|
        |...| width no matter how much text contained|...|
        |...-------------------------------------------...|
        |.............. ............... ............... .....|
        |.............. ............... ............... .....|
        |.............. ............... ............... .....|
        |.............. ............... ............... .....|
        |...-------------------------------------------...|
        |...| should be the same as header but always |...|
        |...| positioned to the bottom of the page |...|
        |...-------------------------------------------...|
        ---------------------------------------------------
        Lauri Raittila <lauri@raittila .cjb.net> wrote in message news:<MPG.1a922 2da86361f97989e 66@news.cis.dfn .de>...[color=blue]
        > In article Malfunction wrote:[color=green]
        > > I've got two classes header and footer. They both have a 2px. border
        > > to make it appear as a box on top and at the bottom of the page. They
        > > both have a standard width (respecting the padding property).
        > > Now I wanted the footer to always apear on the bottom of the page even
        > > if there's a blank page with only header and footer.
        > > So I set it to position:absolu te; bottom:12px; moving it to the
        > > bottom. But now the width of the footer isn't the same anymore but
        > > just as big as the text it contains.
        > > To go round this I set it's width property to 100%. But now it only
        > > respects padding on the left side and not on the right.
        > > Any suggestions?[/color]
        >
        > Use this:
        >
        > right:0;
        >
        > You are in wrong group, use ciwa.stylesheet s for CSS questions. And
        > google it before.
        >
        > Also see
        > http://steve.pugh.net/test/test57a.html[/color]

        Comment

        • Neal

          #5
          Re: css and borders

          On 12 Feb 2004 22:07:25 -0800, Malfunction <wldcdk@yahoo.d e> wrote:
          [color=blue]
          > Sorry for being in the wrong group.
          > But right:0 doesn't do it. I want padding of 10 on either side.[/color]

          10 ducks? 10 lira? 10 pins?
          [color=blue]
          > The
          > standard streches the box over the whole page until it reaches 10
          > pixel from the border.
          > Setting right:0 or 10 the box is aligned to the right but having only
          > the size of the containing text.
          >
          > should look like this:[/color]

          Should look like this:

          width: 100%;
          margin: 10px or 10em or whatever;

          Comment

          • Lauri Raittila

            #6
            Re: css and borders

            In article Neal wrote:[color=blue]
            > On 12 Feb 2004 22:07:25 -0800, Malfunction <wldcdk@yahoo.d e> wrote:[/color]
            [color=blue][color=green]
            > > The
            > > standard streches the box over the whole page until it reaches 10
            > > pixel from the border.
            > > Setting right:0 or 10 the box is aligned to the right but having only
            > > the size of the containing text.[/color][/color]

            Then use left:0 also.
            [color=blue]
            > width: 100%;
            > margin: 10px or 10em or whatever;[/color]

            You never tested it, in standards mode? It causes horizontal scrolling,
            or at least it should.

            copy and f'ups set to ciwas.


            --
            Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
            Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
            tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

            Comment

            Working...