Then I don't see why you wouldn't want the crawler to shrink. If it's a layout issue, like if there's a certain amount of space that must get filled, you could center the crawler within that space, something like:
Code:
<div style="width: 500px;">
<div class="marquee" id="mycrawler"><?php echo $whatever; ?></div>
<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler',
style: {
'padding': '5px',
'width': '100%',
'margin': '0 auto', //centers crawler inside its parent element
'background': 'lightyellow',
'border': '1px solid #CC3300'
},
inc: 8, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 4,
neutral: 150,
savedirection: true
});
</script>
</div>
That way it will always take up 500px or whatever you set the outer div to be, but if it doesn't have enough content to fill that out completely, it will shrink and center itself within that space.
Note: For IE less than 9, the margin 0 auto requires that the page have a standards invoking DOCTYPE in order to work at centering the crawler.
Bookmarks