osCmax v2.5 User Manual
Results 1 to 9 of 9

image auto resize to fit screen width

This is a discussion on image auto resize to fit screen width within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I am using the CSS Fluid1 template ... I would like to put a background image in the "logoFrame" of ...

      
  1. #1
    New Member
    Join Date
    Dec 2009
    Posts
    29
    Rep Power
    0


    Default image auto resize to fit screen width

    I am using the CSS Fluid1 template ... I would like to put a background image in the "logoFrame" of this template and I need it to auto resize ... so that it is the same size as the nav bar under it ... I have been staring at codes and trying different things for countless hours and I am lost ... can someone please help me and let me know if this is even possible .. THANK YOU SO VERY MUCH
    Last edited by mesaboogie; 01-30-2010 at 11:31 PM.

  2. #2
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Default Re: image auto resize to fit screen width

    [Wonders how you're going to cope with the distortion created by non-proportional stretching of the image.]
    Hosting plans with installation, configuration, contributions, support and maintenance.

  3. #3
    New Member
    Join Date
    Dec 2009
    Posts
    29
    Rep Power
    0


    Default Re: image auto resize to fit screen width

    I took the background of the logo and put that in as a background piece, and then the actual logo part, I put in separately ... so the actual logo won't need to stretch, just the background will ....
    if someone could tell the code the so that the background will repeat if necessary, it would be very much appreciated ....

  4. #4
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Default Re: image auto resize to fit screen width

    try..
    Code:
    img#logo {
    position: absolute;
    left: 20px;
    bottom: 10px;
    background-image : url(../../images/logo-background.gif) repeat-x;
    }
    You may need to create a entirely separate entry for the background image though - in mainpage.tpl & stylesheet.
    Last edited by ridexbuilder; 01-31-2010 at 08:30 AM.
    Hosting plans with installation, configuration, contributions, support and maintenance.

  5. #5
    New Member
    Join Date
    Dec 2009
    Posts
    29
    Rep Power
    0


    Default Re: image auto resize to fit screen width

    thankyou ... I've already got the background piece in, I just needed the code for the repeat ... the image itself right now is 2000 pixels wide and its working fine ... I think I may need to cut it into a smaller piece and have it repeat ... I have a 22' wide screen monitor with a screen resolution of 1680 wide ... I would like to have it so that if someone has for instance say a 24" or wider monitor that the background piece will fit accordingly ... so, I think possibly trying to cut it into pieces might be an idea to try ...

  6. #6
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Post Re: image auto resize to fit screen width

    [Physical screen size is irrelevant, it's the resolution that dictates visual width]
    A URL would help but as I use 1280 on a laptop, then POC is the only option.
    Hosting plans with installation, configuration, contributions, support and maintenance.

  7. #7
    New Member
    Join Date
    Dec 2009
    Posts
    29
    Rep Power
    0


    Default Re: image auto resize to fit screen width

    thanks again ... here is the url

    Atlantic Skies Birdie Supplies :

    I have left the piece in as 2000 pixels wide ...
    can you please tell me what the difference is between

    ABSOLUTE and RELATIVE

    I am still in the process of finishing up the site ... I am also redoing all the little gifs that come with OSCMAX ... I plan on replacing all of them and what I don't replace I want to clean up the edges on them ....

    thanks for all your help
    Last edited by mesaboogie; 01-31-2010 at 10:30 AM.

  8. #8
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Arrow Re: image auto resize to fit screen width

    headerbackground.jpg only needs to be 1px wide

    main_layout.css
    Code:
    div#logoFrame {
    background-image:url(images/headerbackground.jpg) repeat-x;
    border:1px solid black;
    height:200px;
    margin-left:15px;
    margin-right:15px;
    position:relative;
    
    
    }
    ABSOLUTE and RELATIVE
    As in other walks of life. Absolute position => fixed; Relative => relative position compared to previous item.
    Hosting plans with installation, configuration, contributions, support and maintenance.

  9. #9
    New Member
    Join Date
    Dec 2009
    Posts
    29
    Rep Power
    0


    Default Re: image auto resize to fit screen width

    thankyou so much for all your help .. this is the first oscmax catalog I have ever done ... and its been one hell of a learning experience ... I have taken the template and changed it and now I'm editing all the graphics ...

    it would be a great idea if all the little icons for the oscmax templates could be .png files on transparent backgrounds ... it would avoid them looking fuzzy around the edges when they are placed on other colours ....

    again, thankyou !

Similar Threads

  1. Dynamic Image Resize
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-18-2009, 05:11 AM
  2. Auto Image change?
    By Stevis2002 in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 04-07-2005, 02:45 PM
  3. add extra image settings width height etc, any info?
    By fridgemags in forum osCMax v1.7 General Mods Discussion
    Replies: 1
    Last Post: 11-20-2004, 08:03 PM
  4. Header Image Resize
    By FlipC in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 11-21-2003, 03:25 PM
  5. Image Resize... or Do I really need to recreate 500 pictures
    By ladykeetes in forum osCommerce 2.2 Modification Help
    Replies: 6
    Last Post: 07-06-2003, 04:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •