Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2009
    Posts
    412
    Tokens
    48

    Default Need HTML/CSS HELP!!

    Hi, i'm making a layout for my up coming site but i can't get something right on it.

    i'm trying to make a maraquee news box, but it keeps going wrong


    This Is What It Should Be:

    Preview: http://habbo-files.freehostia.com/should/index.html


    This Is What It's Coming Out As:

    Preview: http://habbo-files.freehostia.com/

    HELP ME PLEASE!!!
    Quote Originally Posted by BoyBetterKnow View Post
    Cutter went first and I sent. Safeee.

    Quote Originally Posted by BoyBetterKnow View Post
    Cutter is safe. Fast payment etc. Brill buyer

  2. #2
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Edit: Bah, didn't look at source at first :

    Can you do?:

    Code:
    #news_bg #news {
        padding: 0px;
    with the double #?

    Edit2: I suspect that's what ='s wrong
    Last edited by Chippiewill; 26-06-2009 at 09:15 PM.
    Chippiewill.


  3. #3
    Join Date
    Apr 2009
    Posts
    412
    Tokens
    48

    Default

    Quote Originally Posted by 00chips View Post
    Edit: Bah, didn't look at source at first :

    Can you do?:

    Code:
    #news_bg #news {
        padding: 0px;
    with the double #?

    Edit2: I suspect that's what ='s wrong

    what should i change the 0px; to?
    Quote Originally Posted by BoyBetterKnow View Post
    Cutter went first and I sent. Safeee.

    Quote Originally Posted by BoyBetterKnow View Post
    Cutter is safe. Fast payment etc. Brill buyer

  4. #4
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    hmm, if you add padding it starts appearing...
    Chippiewill.


  5. #5
    Join Date
    Apr 2009
    Posts
    412
    Tokens
    48

    Default

    i put the padding the same as the height (25px but it turned into this

    http://habbo-files.freehostia.com/should/index.html
    Quote Originally Posted by BoyBetterKnow View Post
    Cutter went first and I sent. Safeee.

    Quote Originally Posted by BoyBetterKnow View Post
    Cutter is safe. Fast payment etc. Brill buyer

  6. #6
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Oh you plonker, marquee isn't XHTML, remove it and it works.. You can use JS instead to get the same effect...
    Chippiewill.


  7. #7
    Join Date
    Jul 2004
    Location
    Ottawa, Canada
    Posts
    1,363
    Tokens
    106
    Habbo
    Yonder

    Latest Awards:

    Default

    Ye dont use marquees they are poop and old web

  8. #8
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    JS marquee: http://www.howtocreate.co.uk/jslibs/...lemarquee.html

    Btw, the Web Dev toolbar is really useful, use it!

    Edit: I think if you use html ignore and use a JS start html thingy then you can trick it into working...
    Last edited by Chippiewill; 26-06-2009 at 09:47 PM.
    Chippiewill.


  9. #9
    Join Date
    Apr 2009
    Posts
    412
    Tokens
    48

    Default

    Quote Originally Posted by 00chips View Post
    JS marquee: http://www.howtocreate.co.uk/jslibs/...lemarquee.html

    Btw, the Web Dev toolbar is really useful, use it!

    Edit: I think if you use html ignore and use a JS start html thingy then you can trick it into working...

    iv now got


    <p>&nbsp;</p>
    <div id="news_bg">
    <div id="news"><script src="maraquee.js" type="text/javascript"></script></div>
    </div>
    </div>
    <p>&nbsp;</p>
    and in the .js file i have

    <div class="dmarquee"><div>Welcome</div></div>

    now it comes up like http://habbo-files.freehostia.com/should/index.html


    i'n usless at coding, lol XD
    Quote Originally Posted by BoyBetterKnow View Post
    Cutter went first and I sent. Safeee.

    Quote Originally Posted by BoyBetterKnow View Post
    Cutter is safe. Fast payment etc. Brill buyer

  10. #10
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    -.-

    Put:
    <script src="PATH TO SCRIPT/simplemarquee.js" type="text/javascript"></script>

    Between the header tags, not where you want it to show up....

    Put:

    <div class="dmarquee"><div><div>Marquee text</div></div></div>

    Where you want the marquee

    And fill the js file with:

    Code:
    
    
    var oMarquees = [], oMrunning,
        oMInterv =        20,     //interval between increments
        oMStep =          1,      //number of pixels to move between increments
        oStopMAfter =     30,     //how many seconds should marquees run (0 for no limit)
        oResetMWhenStop = false,  //set to true to allow linewrapping when stopping
        oMDirection =     'left'; //'left' for LTR text, 'right' for RTL text
    
    /***     Do not edit anything after here     ***/
    
    function doMStop() {
        clearInterval(oMrunning);
        for( var i = 0; i < oMarquees.length; i++ ) {
            oDiv = oMarquees[i];
            oDiv.mchild.style[oMDirection] = '0px';
            if( oResetMWhenStop ) {
                oDiv.mchild.style.cssText = oDiv.mchild.style.cssText.replace(/;white-space:nowrap;/g,'');
                oDiv.mchild.style.whiteSpace = '';
                oDiv.style.height = '';
                oDiv.style.overflow = '';
                oDiv.style.position = '';
                oDiv.mchild.style.position = '';
                oDiv.mchild.style.top = '';
            }
        }
        oMarquees = [];
    }
    function doDMarquee() {
        if( oMarquees.length || !document.getElementsByTagName ) { return; }
        var oDivs = document.getElementsByTagName('div');
        for( var i = 0, oDiv; i < oDivs.length; i++ ) {
            oDiv = oDivs[i];
            if( oDiv.className && oDiv.className.match(/\bdmarquee\b/) ) {
                if( !( oDiv = oDiv.getElementsByTagName('div')[0] ) ) { continue; }
                if( !( oDiv.mchild = oDiv.getElementsByTagName('div')[0] ) ) { continue; }
                oDiv.mchild.style.cssText += ';white-space:nowrap;';
                oDiv.mchild.style.whiteSpace = 'nowrap';
                oDiv.style.height = oDiv.offsetHeight + 'px';
                oDiv.style.overflow = 'hidden';
                oDiv.style.position = 'relative';
                oDiv.mchild.style.position = 'absolute';
                oDiv.mchild.style.top = '0px';
                oDiv.mchild.style[oMDirection] = oDiv.offsetWidth + 'px';
                oMarquees[oMarquees.length] = oDiv;
                i += 2;
            }
        }
        oMrunning = setInterval('aniMarquee()',oMInterv);
        if( oStopMAfter ) { setTimeout('doMStop()',oStopMAfter*1000); }
    }
    function aniMarquee() {
        var oDiv, oPos;
        for( var i = 0; i < oMarquees.length; i++ ) {
            oDiv = oMarquees[i].mchild;
            oPos = parseInt(oDiv.style[oMDirection]);
            if( oPos <= -1 * oDiv.offsetWidth ) {
                oDiv.style[oMDirection] = oMarquees[i].offsetWidth + 'px';
            } else {
                oDiv.style[oMDirection] = ( oPos - oMStep ) + 'px';
            }
        }
    }
    if( window.addEventListener ) {
        window.addEventListener('load',doDMarquee,false);
    } else if( document.addEventListener ) {
        document.addEventListener('load',doDMarquee,false);
    } else if( window.attachEvent ) {
        window.attachEvent('onload',doDMarquee);
    }
    Last edited by Chippiewill; 26-06-2009 at 10:19 PM.
    Chippiewill.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •