SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: table

  1. #1
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Vancouver,Wa
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    table

    i want to move table up,about even with picture and then span everything out on left side the length of picture.maybe put a small border on it.alot more text in the table the length of picture


    <html>
    <head>
    <title>Untitled</title>
    <title>Sample Layout Templete</title>
    <body>
    <style type="text/css">body{margin:0px;}
    <!--
    -->
    </style>
    <body style=background-color:"tan;">
    <table border="0" width="100%" height="100%"
    cellpadding="0" cellspacing="0">
    <tr bgcolor="#ffebcd">
    <!-- row 1, cell 1: logo -->
    <td colspan="2" height="15%">
    <body><script language="JavaScript1.2"> /*
    Cross browser Marquee script- Dynamic Drive (www.dynamicdrive.com)
    For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
    Credit MUST stay intact*/
    //Specify the marquee's width (in pixels)
    var marqueewidth="900px"
    //Specify the marquee's height
    var marqueeheight="25px"
    //Specify the marquee's marquee speed (larger is faster 1-10)
    var marqueespeed=3
    //configure background color:
    var marqueebgcolor="#ffebcd"
    //Pause marquee onMousever (0=no. 1=yes)?
    var pauseit=1
    //Specify the marquee's content (don't delete <nobr> tag)
    //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
    var marqueecontent='<nobr><font size="+2"><font color="ff6347"><font face="arial">Welcome to Kevin & Lindas Wedding Album ....A Tribute to the Woman I Love.....JULY 19 1997</nobr>'
    ////NO NEED TO EDIT BELOW THIS LINE////////////
    marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
    var copyspeed=marqueespeed
    var pausespeed=(pauseit==0)? copyspeed: 0
    var iedom=document.all||document.getElementById
    if (iedom)
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
    var actualwidth=''
    var cross_marquee, ns_marquee
    function populate(){
    if (iedom){
    cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
    cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
    cross_marquee.innerHTML=marqueecontent
    actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth}
    else if (document.layers){
    ns_marquee=document.ns_marquee.document.ns_marquee2
    ns_marquee.left=parseInt(marqueewidth)+8
    ns_marquee.document.write(marqueecontent)
    ns_marquee.document.close()
    actualwidth=ns_marquee.document.width}
    lefttime=setInterval("scrollmarquee()",20)}
    window.onload=populate
    function scrollmarquee(){
    if (iedom){
    if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
    cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
    else
    cross_marquee.style.left=parseInt(marqueewidth)+8+"px"}
    else if (document.layers){
    if (ns_marquee.left>(actualwidth*(-1)+8))
    ns_marquee.left-=copyspeed
    else
    ns_marquee.left=parseInt(marqueewidth)+8}}
    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
    write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
    write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
    write('</div></div>')}
    else if (document.layers){
    write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
    write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
    write('</ilayer>')}
    document.write('</td></table>')}}
    </script>
    <tr bgcolor="#fafoe6"
    <!-- row 2, cell 1: nav bar -->
    <td bgcolor="ffebcd" class="nav" width="10%" height="85%">
    <!-- row 2, cell 2: content cell -->
    <td width="80%" height="85%">
    <table border="1" cellspacing="4" cellpadding="40" width="37%" length="100%">
    <tr>
    <td bgcolor="#ffdab9">kevin</td>
    </table>
    <img style="position:absolute; top:85px; left:110px; right:30px; width:25px" src="webstuff/heart.gif">
    <img style="position:absolute; top:85px; left:980px; right:300px; width:25px" src="webstuff/heart.gif">
    <img style="position:absolute; top:90px; left:300px; width:500px; height:20px" src="webstuff/tslovlin.gif">
    <img style="position:absolute; top:140px; left:430px; width:250px; height:400px" src="webstuff/Tmp8.jpg" border=0>
    <A HREF="http://www.dynamicdrive.com"><img style="position:absolute; top:500px; left:10px; width:80px; height:30px" src="webstuff/dynamiclogo2.gif">
    <A HREF="http://www.theskull.com/hor_rule.html"><IMG STYLE="position:absolute; top:400px; left:10px; width:80px; height:30px" src="webstuff/hothrs.gif">
    </td>
    </tr>
    </table>
    <script language="JavaScript1.2">
    <!--

    /*
    Flying Cupids- By Dynamic Drive, based on script by Kurt (kurt.grigg@virgin.net)
    For full source, usage terms, and 100's more DHTML scripts
    Visit http://www.dynamicdrive.com
    */

    Cupid=new Image();
    Cupid.src="webstuff/cute.gif"; //specify path to Cupid image
    amount=3; //Number of cupids, minimum must be 3.
    Xpos=700; //cupids x coordinates, in pixel
    Ypos=200; //cupids y coordinates, in pixel
    step=0.3; //Animation speed (smaller is slower)
    dismissafter=5; //seconds after which Cupids should disappear, in seconds

    var ns6=document.getElementById&&!document.all
    bats=new Array(3)
    if (document.layers){
    for (i=0; i < amount; i++)
    {document.write("<LAYER NAME=n"+i+" LEFT=0 TOP=-50><a href='http://www.dynamicdrive.com'><IMG SRC='"+Cupid.src+"' NAME='nsi' width=69 height=60 border=0></a></LAYER>")}
    }
    else if (document.all||ns6){
    document.write('<div id="out" style="position:absolute;top:0;left:0"><div id="in" style="position:relative">');
    for (i=0; i < amount; i++){
    if (document.all)
    document.write('<a href="http://www.dynamicdrive.com"><img src="'+Cupid.src+'" id="msieBats" style="position:absolute;top:-50;left:0" border=0></a>')
    else
    document.write('<a href="http://www.dynamicdrive.com"><img src="'+Cupid.src+'" id="ns6Bats'+i+'" width=69 height=60 style="position:absolute;top:-50;left:0" border=0></a>')
    }
    document.write('</div></div>');
    }

    yBase=xBase=currStep=a_count=0;
    b_count=1;
    c_count=2;
    d_count=3;
    move=1;
    if (document.layers||ns6){
    yBase=window.innerHeight/3;
    xBase=window.innerWidth/6;
    if (document.layers)
    window.captureEvents(Event.MOUSEMOVE);

    }
    if (document.all){
    yBase = window.document.body.offsetHeight/3;
    xBase = window.document.body.offsetWidth/6;
    }

    function dismisscupid(){
    clearInterval(flycupid)
    if (document.layers){
    for (i2=0; i2 < amount; i2++){
    document.layers['n'+i2].visibility="hide"
    }
    }
    else if (document.all)
    document.all.out.style.visibility="hidden"
    else if (ns6)
    document.getElementById("out").style.visibility="hidden"
    }

    if (document.layers){
    for (i=0; i < amount; i++)
    document.layers['n'+i].document.images['nsi'].src=Cupid.src
    }
    else if (document.all){
    for (i=0; i < amount; i++)
    document.all.msieBats[i].src=Cupid.src
    }
    else if (ns6){
    for (i=0; i < amount; i++)
    document.getElementById("ns6Bats"+i).src=Cupid.src
    }

    function Animate(){
    a_count+=move;
    b_count+=move;
    c_count+=move;
    currStep+=step;
    if (a_count >= bats.length) a_count=0;
    if (b_count >= bats.length) b_count=0;
    if (c_count >= bats.length) c_count=0;
    if (document.layers){
    for (i=0; i < amount; i++) {
    var NewL="n"+i
    document.layers[NewL].top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
    document.layers[NewL].left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
    }
    }

    if (document.all){
    for (i=0; i < amount; i++){
    document.all.msieBats[i].style.pixelTop = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
    document.all.msieBats[i].style.pixelLeft =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
    }
    }

    if (ns6){
    for (i=0; i < amount; i++){
    document.getElementById("ns6Bats"+i).style.top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
    document.getElementById("ns6Bats"+i).style.left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
    }
    }

    }
    flycupid=setInterval('Animate()',30);
    setTimeout("dismisscupid()",dismissafter*1000)
    //-->
    </script>
    </body>
    </html>
    </body>
    </html>

  2. #2
    SitePoint Guru kish's Avatar
    Join Date
    Jun 2003
    Location
    UK
    Posts
    923
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have know idea what you're asking... and just posting all that code doesn't help either.
    Best thing for you to do is post a link to the page in questions (we can view source if need be). Then just be specific about the problem you're having and explain what it is you're trying to do.

    cheers
    Fast Fwd Multimedia
    Web, IT & Cloud Computing Consultancy
    Currently looking for web freelancers. Get in touch!

  3. #3
    Forensic SEO Consultant Webnauts's Avatar
    Join Date
    Jun 2003
    Location
    European Union
    Posts
    1,488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I checked you above code. In the first place it is a disaster. Sorry....

    If would be a good idea to post us your URL, as Kish mentioned above.

  4. #4
    SitePoint Guru kish's Avatar
    Join Date
    Jun 2003
    Location
    UK
    Posts
    923
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow, just checked over the code after webnauts post.
    indeed, the syntax of the code is really messed up. Have you considered using a wysiwyg editor. You may find you get etter results than hand coding...
    Fast Fwd Multimedia
    Web, IT & Cloud Computing Consultancy
    Currently looking for web freelancers. Get in touch!

  5. #5
    SitePoint Addict langedav's Avatar
    Join Date
    Apr 2002
    Location
    Rotterdam, The Netherlands
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i thought my code sometimes is a bit messy :-)


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
  •