Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Member
    Join Date
    Nov 2010
    Posts
    31
    Member #
    24712
    Lately theres been alot going on about CSS3 with the background-size option, this isnt supported by all browsers yet tho...
    This is mostly usefull when having a fluid div, now the thing i was thinking of... and i dont know if it works, maybe some1 can brainstorm with me on this.

    I like to use a fluid div that contains an iframe, so several pages can load at the same spot w/o loading the whole layout again, now i was thinking. Instead of adding a bg image in the div containing the iframe.
    Is it an option to put a div on the page you want to load which contains an image. And set that image to 100% with a stretch class?
    so... something like this:

    HTML Code:
    <div id="text">
           <img src="bg.jpg" class="stretch"></img>
    <div id="all_text"> --Here comes your text--</div>
    </div>
    then for a css id say something like this:

    Code:
    #text {
         position:absolute; (i think??)
         width:100%;
         height:100%; /* Both for stretching this div to 100% of the iframe in your layout */
    }
    
    #all_text {
        position:relative; (i think??)
        width:100%;
        height:100%; /* Both for stretching this div to 100% of #text */
        /* also all styles you want for your text */
    }
    
    .stretch {
         width:100%;
         height:100%; /* Stretching your bg image to 100% of #text */
    }
    the only thing i havent found yet is what to do with the positions... like... basically you want to have the div="text" to sit behind the div="all_text" that should have something to do with the positioning??
    Also...i dont know if its true to say that setting 100% width and height it will take up 100% of the div you used to put your iframe in...

    Personally i think that if this works it might be a nice way to fill up the gap CSS3 leaves for now, also itll leave the layout itself alittle neater, cause you wont have img divs everywhere...

    Any1 who can give feedback on this?

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:16 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com