Fork me on GitHub

Fixed size vs 100%  Bottom

Go to page [-1] 1 - 2:

  • If you are using an AutoTheme, then the top logo image is usually coded into the theme.html file.
  • If by "global background" you mean fixed background for all pages, filling the browser window, look at the stylesheet. You'd make it a property of the BODY tag:

    Code

    BODY {
        background: none;
        background: url("../images/bground.jpg") fixed;
    }

    the URL path between brackets is relative to the stylesheet, so above first it moves out of the "style" directory (../), then switches to the "images" directory.
    "fixed" means it doesn't scroll when you scroll the page down. There're other options.

    You can do the sdame for any tag, or classes of a certain tag, eg. TABLE.examples
    CSS syntax is another kettle of fish. Lots of reference sites about, a search here should drag up a few good ones, and any decent HTML editor should handle it with ease. However, even the mighty DreamWeaver could do a lot better. There are things you cannot do through its interface.

    Oh, don't bother with both stylesheets, one is pretty much legacy. I just use styleNN.css for best compatibility, and remove all rules from the other and leave a note instead:
    /* See styleNN.css */
    because browsers don't like it being completely empty.

    Thor
  • How does this fixed work? I use the background-repeat style thingy, does fixed make it expand the whole window of the page?

    REgards

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • Maybe I should have put

    Code

    BODY {
        background: url("../images/bground.jpg") 0 0 no-repeat fixed;
    }
    or
    BODY {
        background: url("../images/bground.jpg") center center no-repeat fixed;
    }
    or
    BODY {
        background-image: url("../images/bground.jpg");
        background-attachment: fixed;
        background-repeat: no-repeat;
        background-position: center center;
    }

    In this case, where you have one large background image, 0 0 is the upper left corner and the default (just as "center center" is horizontal and vertical centering)
    W3C Background-attachment or here
    As mentioned, it just fixes the image in relation to the browser window so it doesn't scroll with the rest of the page ("scroll" is the default, and only other value). Example; the 1st W3C link above use it for their logo. At least that's how it works in standards browsers like Mozilla FireFox or Opera. Works on the BODY in IE, but not it seems on other elements, like DIVs, as it should.
    An example is the Drumschool theme I converted from this thread:
    screenshot
    The background image stays static and doesn't scroll out of view when you scroll down the page. On anything other than IE, the same rule applied to the Block container DIV and Article container, but with slightly different images, produces the effect of translucency, like the panes were stained glass. Apply a Glass Ripple filter to these images, or some other effect like gaussian or motion blur, and you have some cool transparency effects, all done with background-attachment: fixed;
    But as mentioned, IE fails on the container elements, as well as failing positioning relative to the browser window (2 strikes against their claim of CSS1 compliance), so in this example I applied the IE Alpha filter to similar effect. This is possible by exploiting an IE CSS bug, which all other browsers ignore.

    Unfortunately there isn't a way to resize a background image, or auto-resize to fill an area.
  • Thanks for the great description, I will have to try this out soon :)

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • First (and main) thing that I look for in a theme is that it works with my resolution; as a person using 1400x1050 on a laptop there isn't many that look good but fit... As I'm on a laptop, dropping my resolution makes my screen resize itself so there isn't much option in that. I just wish that more deveoplers would go the extra mile for people in my boat... Theres nothing that I hate more than to go to a webpage that'd designed for fixed width only as all I end up seeing is white overflow on the sides of their design...
  • gizmo

    First (and main) thing that I look for in a theme is that it works with my resolution; as a person using 1400x1050 on a laptop there isn't many that look good but fit... As I'm on a laptop, dropping my resolution makes my screen resize itself so there isn't much option in that. I just wish that more deveoplers would go the extra mile for people in my boat... Theres nothing that I hate more than to go to a webpage that'd designed for fixed width only as all I end up seeing is white overflow on the sides of their design...


    I have been thinking about this a lot lately and I would like my themes to cater for this, but the problem is that I do not have access to this resolution - I just can't test properly...

    Maybe I will have to shell out ona desktop with a big monitor one day...

    REgards

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • i have no problem taking screen shots ;)... You have AIM? If so add LordMoguai to your list.
  • No Worries, thanks a lot, Gizmo I will keep this in mind when I create my next theme; thats if I manage to survive all the pending lawsuits... LOL

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • np ;), i'm always on AIM; generally bored :/..
  • The only problem with the theme that i am currently using is that lots of people hate have to scroll over to see whats on the right side of my site. I know thats really petty, but I would like to know what part of the file do I need to modify to make some people happy including me. Thanx
  • msandersen

    I'm not a real themer, I just sometimes like to mess with PostNuke and clean up/update old themes for fun.


    Much to the contrary, msandersen seems to be one of the few real themers out there.
  • GlueBeard

    msandersen

    I'm not a real themer, I just sometimes like to mess with PostNuke and clean up/update old themes for fun.


    Much to the contrary, msandersen seems to be one of the few real themers out there.


    yes I agree :)

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment

Go to page [-1] 1 - 2:

  • 0 users

This list is based on users active over the last 60 minutes.