Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Is a "fluid" Header image possible? (http://forum.bytesforall.com/showthread.php?t=5532)

agentc0re Jan 26, 2010 06:17 PM

Is a "fluid" Header image possible?
 
I searched the forums and found an old post from last year about this http://forum.bytesforall.com/showthread.php?t=301

However the code mentioned to be changed looks different now and i'm guessing that is because of updates and what not. Just want to make sure that the majority of it is still relevant. Or maybe there's a better/easier way to do this now.

I am currently using the style, "Overlayed Blog Title/Tagline Style" to display that info and then center it within the header(which is awesome!) and am hoping that doing the above would also keep this the same and center it non the less.

agentc0re Jan 27, 2010 11:44 PM

Well i've tried adding the following in HTML INSERTS: HEADER
Code:

<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function(){ 
        // Header image auto resize on views resolution
        var headerwidth = jQuery("td#header").width();
        jQuery("#imagecontainer").each(function() {
                var maxwidth = headerwidth + 'px';
                var imgwidth = jQuery(this).width();
                var imgheight = jQuery(this).height();
                var newimgheight = (headerwidth / imgwidth * imgheight) + 'px';   
                if (imgwidth > headerwidth) {
                  jQuery(this).css({width: maxwidth});
                  jQuery(this).css({height: newimgheight});
                }
        });
});
//]]>
</script>

And in CSS INSERTS
Code:

#imagecontainer { max-width: 100%; width: auto 100%; height: auto 100%; }
But the header image is not resizing when someone with a smaller resolution views my website. I have a netbook that i've been testing it out on. the image still gets cut off.

The code above is basically from the post i mentioned and after viewing the current code in the header.php i changed it accordingly to what i thought would make it work. I don't know how jQuery works either, but it appears to be checking for what was inputted in for the height/width for the image and the width of the overall layout but my layout is a percentage and not a number... and only the height of the image is a number that was defined within the configuration in HEADER IMAGE. I'm not sure if it is able to determine the actual size of the image or if it's looking for values that have defined it exactly.

Ultimately if i can get this sorted i'd love to do the same for the background image.

Any help is much appreciated. TIA.

agentc0re Jan 29, 2010 10:10 AM

Was reading around and saw donations are required for more customized help, like my post. So i've happily donated, as i think this theme is well deserved for the amount i sent. Milk and cookies on me! :P

agentc0re Feb 3, 2010 02:04 AM

bumpity bump.


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

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