Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorSpookyET
    • CommentTimeApr 15th 2006 edited
     permalink
    I'm having trouble with adding borders to the page. If I use a background image for the body that contains both the left and the right borders; it works. But, obviously, it won't scale and it's a big image. However, If I use 2 images, I add a left-top border to html and a right-top border to body, It will not work.

    This is the effect I'm trying to do: http://www.studioindustryllc.com/misc/newlayout.jpg
    Ignore the text, it's a place-holder text.

    XHTML: http://www.studioindustryllc.com/misc/new-layout/mockup.html
    CSS: http://www.studioindustryllc.com/misc/new-layout/mockup.css
    Images: http://www.studioindustryllc.com/misc/new-layout/img/global

    Right, now as a background, it uses http://www.studioindustryllc.com/misc/new-layout/img/global/body-background.png . The separate margins are http://www.studioindustryllc.com/misc/new-layout/img/global/body-margin-left.png and http://www.studioindustryllc.com/misc/new-layout/img/global/body-margin-right.png .

    The banner has a background image that creates the green borders and shadow.
    The problem is that it won't scale. I could modify the banner to include the borders, but I'll have to modify all: http://www.studioindustryllc.com/misc/header.jpg

    PS: Please give points on how to make the site scale. This is my first time not being a Pixel NAZI.
    •  
      CommentAuthorSpookyET
    • CommentTimeApr 15th 2006
     permalink
    Stupid me. Sleep deprivation.
    Since both html and body have the same width, body overlaps html, and it overlaps the left background. Meaning, BODY needs to have a left margin added and its width decreased.
    •  
      CommentAuthorSpookyET
    • CommentTimeApr 15th 2006
     permalink
    However, it looks like Opera doesn't like setting the font on HTML. It makes the page real tiny:

    html
    {
    background: #fff url(img/global/body-margin-left.png) repeat-y top left;
    width: 46.8em;
    margin: 0 auto;
    }

    body
    {
    font: 62.5%/1.7em Verdana, Geneva, Arial, Helvetica, sans-serif;
    background: #fff url(img/global/body-margin-left.png) repeat-y top right;
    margin-left: 5em;
    width: 70em;
    }
    •  
      CommentAuthorSpookyET
    • CommentTimeApr 15th 2006 edited
     permalink
    I still got a problem. The HTML background image is not going all the way to the bottom.
    •  
      CommentAuthornifkin
    • CommentTimeApr 16th 2006 edited
     permalink
    for FF this fixes it.

    html, body { height: auto; }

    to work with IE it might need

    html,body { height:auto !important; height:100%; }

    and even then you might want a min-height of 100% in there too, depending on how much stuff will be going on your pages.

    Once you switch over to the XML parser instead of the HTML one the heights on some stuff (mainly just BODY and HTML) aren't assumed to work the same way. If you have a page with very little content on it, for example, your backgrounds will still end at the end of it since even the BODY and HTML elements aren't assumed to go the whole height of the browser window, just to expand to the height of the content.
    •  
      CommentAuthorSpookyET
    • CommentTimeApr 16th 2006 edited
     permalink
    The thing is that it looks the same with text/html. Isn't height auto by default? It does not fix it though. HTML still goes full screen. It made body even shorter. However, according to the DOM inspector, BODY is full height.
    •  
      CommentAuthorSpookyET
    • CommentTimeApr 16th 2006
     permalink
    I know what the problem is. h2, and #page are floated. I think I have to use absolute positioning instead.
    •  
      CommentAuthornifkin
    • CommentTimeApr 16th 2006 edited
     permalink
    Isn't height auto by default?

    Yes but in FF you're limiting it to 100% of the window dimension, not 100% of the content height.
    •  
      CommentAuthorSpookyET
    • CommentTimeApr 16th 2006 edited
     permalink
    auto won't work. html does not seem to go 100% of the window, but the background does.
  1.  permalink
    And so you know, Opera < 9 has a default font size of like 10% smaller than every other browser.

    If you want your page 100% height when there isn't enough content, try,

    html { height: 100%; }
    body { height: 100%; min-height: 100%; }
    •  
      CommentAuthorSpookyET
    • CommentTimeApr 16th 2006
     permalink
    I've been playing with background-colors. It looks like a background on html fills the entire screen no matter what the height of HTML is: See http://www.studioindustryllc.com/misc/new-layout/test.html (look at the source code and what's rendered)
    •  
      CommentAuthorSpookyET
    • CommentTimeApr 16th 2006
     permalink
    I found another anomaly in OPERA. HTML takes the background image of the BODY if you do not specify a background colour on HTML. See: http://www.studioindustryllc.com/misc/new-layout/test2.html
    •  
      CommentAuthorSpookyET
    • CommentTimeApr 16th 2006
     permalink
    Do any of you know how to make that h2 have a height of 100% like in the screenshot? If I set it to absolute, it goes over the footer way down.
Add your comments
    Username Password
  • Format comments as (Help)