40 users online (1 members and 39 guests)  


  Results 1 to 2 of 2

Related

  1. the PERFECT scrolling layer???!?    Forum: CSS Forum
    Replies: 1
  2. Layer scrolling problems    Forum: CSS Forum
    Replies: 3
  3. Scrolling in layer?    Forum: CSS Forum
    Replies: 2
  4. MySQL DB Abstraction Layer    Forum: PHP Forum
    Replies: 3
  1. #1
    quest_ans's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2008
    Posts
    1

    div layer question

    I have created a simple myspace layout with a top banner, I was having trouble figuring out how I could insert an image anywhere on the page without affecting what was on the page.
    I tried to use many Div layer codes but none of them worked, when I inserted the code in, it would move some of the myspace section to the right.

    After troubleshooting I figured I could use some of my top banner code to insert image anywhere on my page without it affecting any elements on the myspace page but I am unable to add more than one,
    I ended up putting the code below into the "band members" area.
    here is the code I used to insert the image;

    <style>
    div.topbanner {
    position: relative;
    top: 20px;
    left: 50%;
    width: 300px;
    margin-left: -200px;
    height: 500px;
    }
    </style>
    <div class="topbanner">
    <a href='http://www.tinasmith.com/images/banner_music.gif'>
    <img src="http://www.tinasmith.com/images/banner_music.gif" >
    </div>


    how can I insert more than one?

    help would be greatly appreciated.


  2. #2
    codybear's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Oct 2008
    Posts
    142

    Re: div layer question

    you're going to use the same coding that you have already used,
    but change the following in red,

    <style>
    div.topbanner {
    position: relative;
    top: 20px;
    left: 50%;
    width: 300px;
    margin-left: -200px;
    height: 500px;
    }
    </style>
    <div class="topbanner">
    <a href='http://www.tinasmith.com/images/banner_music.gif'>
    <img src="http://www.tinasmith.com/images/banner_music.gif" >
    </div>

    You'll want both to be the same like you had, but you for each new one you have to name it something else.

    Obviously you'll change the image sources for the image you want to put in the second image banner,
    and then you'll also want to play with the positioning codes that you used;

    top: XXpx;
    left: XX%;
    width: XXpx;
    margin-left: XXpx;

    To get it to the exact position you'd like for that particular div. If you don't change the positioning it will just cover up the first image banner.




    Also i would recommend using:

    position: absolute;

    INSTEAD of:

    position: relative;

    That should keep the banners in the right spot on the page and shouldn't affect anything else on the page.
    but in some cases relative is better on myspace.



    And remember that if you use Internet Explorer to write your profile coding in, that your profile will look different in safari and firefox. just a fyi if you didn't already know.

    I'm not on much anymore,
    so please be patient myspace coders!



Tags for this Thread