Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   background image over-sized - Full Page Background Image (http://forum.bytesforall.com/showthread.php?t=6522)

prokopino Mar 30, 2010 03:44 AM

background image over-sized - Full Page Background Image
 
greetings from greece!
i want to make my background image fixed (over-sized..) in the viewers resolution.
is it possible to do this with atahualpa theme?

see an example of what i want to do here

thanks for your time,
prokopino, greece

juggledad Mar 30, 2010 04:16 AM

yes it is possible. Lets say you put your image in wp-contents/uploads and it is called bg.jpg, ou will add the following to ATO->Add HTML/CSS Inserts->HTML Inserts: Body Top
HTML Code:

<img src="./wp-content/uploads/bg.jpg" class="bg" />
and then add this to ATO->Add HTML/CSS Inserts->CSS Inserts
HTML Code:

img.bg {
        /* Set rules to fill background */
        min-height: 100%;
        min-width: 1024px;
       
        /* Set up proportionate scaling */
        width: 100%;
        height: auto;
       
        /* Set up positioning */
        position: fixed;
        top: 0;
        left: 0;
}
div#container {
        /* This is the only important rule */
        /* We need our content to show up on top of the background */
        position: relative;
}

neat little trick the guy came up with.

No guarantees it will work in all cases - this will cause the image to show behing the contents aslo, if you want the image to be hidden behind the container, add 'background: #ffffff;' to the container css.

prokopino Mar 30, 2010 04:42 AM

thanks for your answer.
i will try it tonight and i will tell you!

thanks again!


All times are GMT -6. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.