www.webdeveloper.com
Results 1 to 11 of 11

Thread: css and java

  1. #1
    Join Date
    Apr 2004
    Posts
    4

    Question css and java

    hello..i have started a forum but the coding is in css which is not a problem in most parts but, I use java alot...just love java...i was wondering if there was a css code that could scroll text like java can.If there is....could i please have it?please....
    Last edited by o0alina0o; 04-27-2004 at 09:03 PM.

  2. #2
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    I believe this is more of a DHTML question. You are referring to Java apposed to JavaScript, right?

  3. #3
    Join Date
    Apr 2004
    Posts
    4
    no....i have a forum that i can only code in css
    i usually code in java......
    but i need a code in css...something like a java text scroller but in css.ok..a css text scroller

  4. #4
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,276
    No such thing in CSS, but you are in luck!

    There is a very handy feature that you an take advantage of, it's called a "scroll bar".
    You can have certain areas of your page scrolling by doing something like this:

    Code:
    <p style="overflow:auto;width:300px;height:100px;border:1px solid #000;">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris dictum erat ornare nibh.
    *** sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam gravida lectus ut risus.
    Sed mattis, erat a vehicula laoreet, quam mauris rutrum dui, quis mattis mi lectus sit amet lacus.
    Nam condimentum orci non est. Aenean sed nunc. Aliquam quam orci, bibendum ac, mollis quis, pellentesque in, sem.
    Integer neque felis, dignissim id, condimentum eu, lacinia sit amet, mi. Curabitur vel quam.
    Fusce eget dui eget odio tincidunt hendrerit. Aenean diam ligula, tempor et, congue et, tempor eu, est.
    Morbi quis sem ut lectus rutrum vulputate. Donec mattis velit eget felis.
    </p>
    This will create an area on your page that is a fixed size but allows users to scroll to see all of the content. It doesn't scroll automatically like I imagine that you want.
    Last edited by David Harrison; 04-28-2004 at 04:20 AM.
    Every fight is a food fight when you’re a cannibal.

  5. #5
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    no....i have a forum that i can only code in css
    i usually code in java......
    but i need a code in css...something like a java text scroller but in css.ok..a css text scroller
    Like i said, it cant be done. CSS is not a programming language...

    You cant 'code' in CSS, technically. If you can use CSS, then you can use JavaScript, DHTML, etc.

    Regards,
    Andrew Buntine.

  6. #6
    Join Date
    Apr 2004
    Posts
    32
    Alot of message boards allow html and css but do not allow Javascript or VBscript, I think is what they're saying. Alot of DHTML is actually just old Javascript rolled in and there by not allowed.

    Are you talking about something like a news scroller? You may want to look at the <marquee> tag for a nice Java script alternative. Its fairly robust with controls for dimensions, scroll direction(up,down,left,or right), scroll speed, and the like. I've even used it on various projects to make a page feel less static. Such as the header on Seattle Game Con
    Last edited by KarmaKills; 04-28-2004 at 11:48 PM.

  7. #7
    Join Date
    Apr 2004
    Posts
    4

    lavalamp

    cool.ill try that lavalamp.see what its like....thanks all for ur help

  8. #8
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,276
    Originally posted by KarmaKills
    You may want to look at the <marquee> tag for a nice Java script alternative. Its fairly robust with controls for dimensions, scroll direction(up,down,left,or right), scroll speed, and the like.
    I'm afraid it's not fairly robust, it's not standard markup and so only works in IE.

    Apart from that, read this.

    Note. The BLINK and MARQUEE elements are not defined in any W3C HTML specification and should not be used.
    Every fight is a food fight when you’re a cannibal.

  9. #9
    Join Date
    Apr 2004
    Posts
    32
    Let me rephrase 'its fairly robust'. It serves its purpose and is flexible enough for multiple aplications if used right.

    As far it only working on IE. It was originally created in IE long ago, during the whole browser wars between IE and Netscape. Alot of proprietary code was created and alot of it has since found its way into HTML and DHTML. Some of it has not but browsers have picked up support. I have tested marquee under current versions of IE, Navigator, Mozilla, and Firefox without any problems. I have not tested under Opera or Mosiac honestly. But it only working under IE is certainly not true.

  10. #10
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    A shrine to the <MARQUEE>
    Last edited by Robert Wellock; 04-29-2004 at 12:08 PM.

  11. #11
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,276
    Sorry, I was under the impression that it was IE only, maybe I just wished it was and that Moz hadn't been lowered to such a low standard of non-standard markup.

    In any case I have to go and buy evan a G5, he is such a nice guy.
    Every fight is a food fight when you’re a cannibal.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles