Results 1 to 7 of 7

Thread: Crawler positioning on screen

  1. #1
    Join Date
    Jan 2012
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Crawler positioning on screen

    Im using this script:

    http://www.dynamicdrive.com/dynamici...wler/index.htm

    I create customized html and changed the values, it works fine but the width doesnt seem right, the height is right.

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML><HEAD>
    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8">
    <META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="en-UK">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PUBLIC">
    <TITLE>New Project</TITLE>
    <style type="text/css"> .divScrollAuto {overflow:auto;    white-space:nowrap;}</style>
    <script type="text/javascript" src="crawler.js"></script>
    </HEAD><BODY style="width: 1000px;height: 1000px;background-color: #FFFFFF; ">
    <div class="marquee" id="newdiv1">>Enter Text</div><script type="text/javascript">marqueeInit({	uniqueid: "newdiv1",	style: {		"padding": "5px",		"width": "529px",		"height": "59px","background-color": "#00FF00","direction": "left",		"border": "1px solid #CC3300"	},	inc: 10,	mouse: "cursor driven",	moveatleast: 5,	neutral: 264.50,	savedirection: true});</script>
    </BODY></HTML>

    In the next version i wanted to position the div exactly on the browser window but the code below doesnt work

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML><HEAD>
    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8">
    <META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="en-UK">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PUBLIC">
    <TITLE>New Project</TITLE>
    <style type="text/css"> .divScrollAuto {overflow:auto;    white-space:nowrap;}</style>
    <script type="text/javascript" src="crawler.js"></script>
    </HEAD><BODY style="width: 1000px;height: 1000px;background-color: #FFFFFF; ">
    <div class="marquee" id="newdiv1" title="" style="overflow: hidden; white-space:nowrap;  top: 100; left: 269; position: absolute; z-index: 101; width: 431px; height: 120px; ">Those confounded friars dully buzz that faltering jay. An appraising tongue acutely causes our courageous hogs. Their fitting submarines deftly break your approving improvisations. Her downcast taxonomies actually box up those disgusted turtles.Enter Text</div><script type="text/javascript">marqueeInit({	uniqueid: "newdiv1",	style: {		"padding": "5px",		"width": "431px",		"height": "120px","background-color": "#FF8040","direction": "left",		"border": "1px solid #CC3300"	},	inc: 10,	mouse: "cursor driven",	moveatleast: 5,	neutral: 215.50,	savedirection: true});</script>
    
    
    </BODY></HTML>
    any ideas.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,954
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    I know those are only code snippets, but you do need to have the copyright notice on the page.

    That said, In the first example, there isn't enough text to fill out the 529px width that's specified.

    In the second example, you've done something that the script doesn't allow, namely given the marquee division itself style. For what you're trying to do there, you may use a container div:

    Code:
    <divs style="overflow: hidden; white-space:nowrap;  top: 100; left: 269; position: absolute; z-index: 101; width: 431px; height: 120px; ">
    <div class="marquee" id="newdiv1">Those confounded friars dully buzz that faltering jay. An appraising tongue acutely causes our courageous hogs. Their fitting submarines deftly break your approving improvisations. Her downcast taxonomies actually box up those disgusted turtles.Enter Text</div>
    </div>
    <script type="text/javascript">marqueeInit({
    	uniqueid: "newdiv1",
    	style: {
    		"padding": "5px",
    		"width": "431px",
    		"height": "120px",
    		"background-color": "#FF8040",
    		"direction": "left", // <-- Get rid of this
    		"border": "1px solid #CC3300"
    		},
    	inc: 10,
    	mouse: "cursor driven",
    	moveatleast: 5,
    	neutral: 215.50,
    	savedirection: true
    });
    </script>
    Also, in the style section of the marqueeInit, I don't believe "direction": "left", is valid. The direction property in style must be ltr or rtl, possibly ttb or btt, it's how the text reads in the element (right to left, or left to right), and would have nothing to do with the direction of the marquee. However the default direction for any marquee is left, so that's what will happen. I'd remove it from the style section though, it may be causing an error.

    With both of these examples, there could also be other problems.

    If you want more help, please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2012
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    the manual says use left or right for direction
    direction: 'right', ('right' or 'left') Direction of marquee. (defaults to 'left' - easiest for reading text marquees)
    Also thanks for pointing out the copyright requirement I will add it to the final source code.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,954
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    Yes, the manual says that. But it's not to be as part of the style, as you had it. You could do:

    Code:
    <script type="text/javascript">marqueeInit({
    	uniqueid: "newdiv1",
    	style: {
    		"padding": "5px",
    		"width": "431px",
    		"height": "120px",
    		"background-color": "#FF8040",
    		"border": "1px solid #CC3300"
    		},
    	inc: 10,
    	mouse: "cursor driven",
    	direction: "left",
    	moveatleast: 5,
    	neutral: 215.50,
    	savedirection: true
    });
    </script>
    But, since it's the default, just get rid of it like I said.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jan 2012
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok made this one with your tip. it works, but the black border is missing two edges

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,954
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    Withe padding, the marquee is taller and wider than the container whose overflow is hidden. You could work out the math more precisely so that the entire marquee, border included could be seen. But it would be easier to remove the border from the marqueeInit and add it to the container.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jan 2012
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    when using pictures in the marquee how do you crop or downsize llarger images so they fit the marquee height??

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
  •