Overlapping the image or text over another text……….

Discussion in 'HTML & Website Design' started by weknowtheworld, Nov 25, 2006.

  1. #1
    We came across this script which is a small code but very effective in dynamically placing images or text over anything without using advanced JavaScript.

    It’s really worth utilizing in web site…………

    Just follow these 2 simple steps……

    1>Step 1
    Place the code below in your head tag…….
    <quote>
    <style type="text/css">
    <!--
    #Layer1 {
    position:absolute;
    width:200px;
    height:115px;
    z-index:1;
    left: 150px;
    top: 95px;
    }
    -->
    </style>
    </quote>
    2>Step 2
    And place this code in the body tag. That’s all!
    <quote>
    <div id="Layer1"></div>
    </quote>
     
    weknowtheworld, Nov 25, 2006 IP
  2. josephfrancis

    josephfrancis Member

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Hello,

    Just be careful,

    Your using code that relies on the browser to transfer it from code to the desired output. This means your visitors will all use different browsers and if you don't do this right and use code that works on all browsers then your going to have a webpage with errors.

    Hope this helps

    Joe
     
    josephfrancis, Nov 25, 2006 IP
  3. kpwnd

    kpwnd Peon

    Messages:
    108
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You don't have to use javascript for that.

    Its called "layers" in XHTML.

    Dreamweaver has a very good layer editor. An example of a code is such..

    CIW - Dreamweaver - XHMTL expert.
    Jared Morris
     
    kpwnd, Nov 25, 2006 IP
  4. josephfrancis

    josephfrancis Member

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    Hello,

    Are these layers able to be viewed identically the way it was designed on all browsers (current and older)

    Just wondering

    Joe
     
    josephfrancis, Nov 25, 2006 IP
  5. Luke

    Luke Peon

    Messages:
    111
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    XHTML isnt supported by alot of older browsers unfortunately, but it's great for newer browsers!
     
    Luke, Nov 27, 2006 IP