Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9

Thread: question on CSS

  1. #1
    Junior Member
    Join Date
    Jul 2003
    Posts
    2
    Member #
    2010
    I'm kind of a newbie on everything outside of HTML, and had a question of the capabilities of CSS.

    I have a picture site, and want to add an effect to every picture on the site (a glow on mouseover). I found a javascript code that allows me to do this, now here's my question. Can CSS be used to apply this JS code to every picture on a page? If not, what should I use? Thanks

    --Andy

  2.  

  3. #2
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    Maybe you should post what you have. Javascript would be used to switch images, but I've never seen it used to enhance the same image. Post a link to what you've found, or attach the JS or CSS code in question.

  4. #3
    Junior Member
    Join Date
    Jul 2003
    Posts
    2
    Member #
    2010
    Ive got no CSS code, but this is what I've got JS. The site i'm applying this to is here http://auburnbest.f2o.org/andyenkeboll/homecoming.htm

    Code:
    <script>
    <!--Write the color of the glow between the "" like in the example below-->
    glu20092="yellow"
    <!--Don't edit from here on-->
    p20092=0
    function com20092(){
    gl20092=new Array()
    gl20092[0]="3"
    gl20092[1]="4"
    gl20092[2]="5"
    gl20092[3]="4"
    if (p20092<4){
    p20092++
    }else{
    p20092=0
    }
    imm20092.style.filter=("chroma(color=green) Glow(color="+glu20092+",
    strength="+eval("gl20092["+p20092+"]")+")")
    rr20092=setTimeout("com20092()",100)
    }
    function aca20092(){
    clearTimeout(rr20092)
    imm20092.style.filter=("chroma(color=green)")
    }</script>
    <a onclick=location.href=
    'http://auburnbest.f2o.org/andyenkeboll/homecoming/dinner9.jpg'><img border=0
    src="http://auburnbest.f2o.org/andyenkeboll/homecoming/dinner9_small.jpg
    " id='imm20092' onmouseover=com20092() onmouseout=aca20092() style='border:10px
     green solid;filter:chroma(color=green)' style='cursor:hand'></a>
    <!-- End of script -->

  5. #4
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    CSS can do this, but ONLY on IE 6+ using the proprietary filters. It's pretty buggy in itself and usually kills processor speed. That javascript is doign exactly that... you could achive the same by creating a simple thing class for your images:

    Code:
    a.image:over{
    border:10px green solid;
    filter:chroma(color=green);
    }
    
    ...
    
    <a href="yourlink.jpg" class="image"><img...
    Should work afiak.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  6. #5
    Senior Member DanielOliver's Avatar
    Join Date
    Jun 2003
    Location
    Cornwall, England.
    Posts
    1,202
    Member #
    1879
    Can you combine html with css etc? I know you can with php etc but was wondering what HTML will work with? Can someone list all its capabilities, what other coing languages will it workwith?

  7. #6
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    CSS is used to add styles to the webpage, it replaces a lot of the attributes in HTML tags to cut down on the size of the page.

    Anyway, this is off topic so if you want to continue please do so in another thread
    JR

  8. #7
    Senior Member cbor's Avatar
    Join Date
    Jun 2003
    Posts
    283
    Member #
    1825
    Originally posted by DanielOliver
    Can you combine html with css etc? I know you can with php etc but was wondering what HTML will work with? Can someone list all its capabilities, what other coing languages will it workwith?
    Yes you can use CSS inside the html code if thats what you were asking...
    regards,
    robc

  9. #8
    Senior Member DanielOliver's Avatar
    Join Date
    Jun 2003
    Location
    Cornwall, England.
    Posts
    1,202
    Member #
    1879
    Yeah thankyou, sorry about combining the two threads, but I was being lazy but thank you anyways, top stuff.

  10. #9
    Junior Member
    Join Date
    Oct 2003
    Posts
    5
    Member #
    3517
    hmmm

    I'm no expert - but as far as I know CSS can only really make links give highlights etc, not graphics. But I could be wrong???? Hopefully someone else can confirm this.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:35 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com