Question:

HTML help PLEASE!! (iFrame, BG)

by  |  earlier

0 LIKES UnLike

I have a site and I want a picture for the BG. I'm not sure what code to use but I've tried alot of codes and I haven't even seen the picture on my BG! Where and what do I place the BG code? (its an image BTW) does it go on my CSS page or my index page?

Also, I have a image which i have "image mapped" on PSP9. There are links on the pictures now to take you to resources, tutorials, site etc etc but it opens in a new page but I want it in th iFrame. I tried copying and pasting the iFrame code next to one of the links but the code was showing and then the link became unclickable... help.

so long story short.

where, what do I pupt in my index/css page for an image repeating bg?

&&...

How, where, what do I put to make my "image mapped" links appear in the iFrame?

 Tags:

   Report

2 ANSWERS


  1. It's hard to give you an exact answer without seeing your page, but to get external links to open inside an iframe, you must have a name for the iframe for these links to know where to load the page when clicked.

    If you are using a non-tileable image for your background image and want it in the body of your page, use CSS.  An external stylesheet file would be better so you can style your whole page and others you add.  If for only the one page, then put this embedded style between your head tags:

    <style type="text/css">

    body {

    background: #fff url(path to image) no-repeat center scroll;

    }

    </style>

    If for a wrapper div, use this:

    <style type="text/css">

    div#wrap {

    width: XXpx;

    height: YYpx;

    margin: 0 auto;

    background: #fff url(path to image) no-repeat center scroll;

    }

    </style>

    Then for the wrapper div between the body tags:

    <div id="wrap">

    Page contents

    </div>

    Remember this is for a non-tileable image and image scrolls with contents.  To have contents to scroll over image, use 'fixed" in place of 'scroll'.  Change background color (#fff) to color of choice. Set the width of the wrapper div to the size of the image if no bg color needs showing on edges.

    For tileable images:

    <style type="text/css">

    body {

    background: #fff url(path to image) repeat left top scroll;

    }

    </style>

    and for wrapper div:

    <style type="text/css">

    div#wrap {

    width: XXpx;

    height: YYpx;

    margin: 0 auto;

    background: #fff url(path to image) repeat left top scroll;

    }

    </style>

    Some people call themselves web designers, but have no concept of what they are talking about.

    Ron


  2. You can either put the css in the page at the top, or make an external style sheet that links to it.

    The style for the background will be (if you put it in the page):

    <style>

    body{

    background-image: url(imagelocation.jpg);

    }

    </style>

    The image mapped links looks like they're opening up in '_blank', go and change this to nothing or 'self' and it should open inside of the iframe.

    Hope that helps.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.