Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Need A Code to enables you to write over an image

  1. #11
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <script language="JavaScript" type="text/JavaScript">
    The language attribute is deprecated.
    Code:
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    Urgh, DreamWeaver junk, using browser detection.
    Code:
    <div id="Layer1" style="position:absolute; width:1200px; height:800px; z-index:1; visibility: visible; left: 0px; top: 0px;">
    Will only work if everything page is absolutely-positioned using pixels, a very bad idea.
    Code:
    <img class="header1" src="pics/header1.jpg" width="1083" height="224" border="0">
    The width, height and border attributes are all deprecated for CSS.
    Code:
    <br><br>
    text
    That's an abuse of <br>.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #12
    Join Date
    Aug 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up One Solution That worked for me

    Hi im kinda new at web programming, but highly experienced on other languages.

    Heres something that worked for me without using some Heavy Javascript Code.

    First ive defined these two styles :

    .FontDarkGreen2{
    FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size : 11px;
    color : #4F7242;
    top: 30px;
    left: 12px;
    position: absolute;
    z-index:2;
    visibility:visible;

    }

    .ImageLayer
    {
    /*top: 280px;
    left: 350px;*/
    position: relative;
    width:320px;
    height:360px;
    z-index:1;
    visibility:visible;
    }

    Then you only need to use an html like this:

    <div id ="firstDiv" class="ImageLayer">
    <img name="".......>
    <div id="MyDivMapa" runat="server" class="FontDarkGreen2" />
    </div>

    Then i used vb to generate dynamically the .innerHtml conten of MyDivMapa thats All ; )

    NOTE: The Text Element with Class = FontDarkGreen2 MUST BE NESTED INSIDE element with Class = ImageLayer.
    Trick an Absolute POsition inside a father element with relative positioning,
    is limited to its anchestor positining limits

    Hope this has been usefull.

    Cheers

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
  •