SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    Oct 2004
    Location
    australia
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rollover Effect on a Mysql Record in PHP ?

    Hi,
    I am fairly new to PHP so this may be simple, im not sure.

    Im creating a LINKS page which just needs to list web address records from a Mysql database, no problems with that.
    But how do I add a rollover effect to change the text color or font size in PHP??

    Thanks,
    Dudester

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    UK
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dudester,

    PHP is entirely server-side. Once the page is on the client computer PHP can't work with it without sending further requests to the server.

    Posting your question in the Javascript forum would be better, I think. Adding a little bit of Javascript to your PHP page is quite easy and not as obtrusive as I might have thought.

  3. #3
    Are You There? KDesigns's Avatar
    Join Date
    Oct 2003
    Location
    Your Monitor
    Posts
    1,147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are calling your addresses in a loop, where you echo the addresses just set a CSS class to the link. Then in your CSS file set the link styles the way you want:
    Code:
    a.class:link {
        color: #000000;
        text-decoration: none;
    }
    a.class:hover {
        color: #123456;
        text-decoration: underline;
    }
    
    /* etc, etc, etc....  */
    ChooseDaily.com - Follow on Twitter
    Top Resources for Web Designers and Developers Every Day!

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    UK
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    KDesigns,

    That didn't even cross my mind, which is suprising since I'd recently been making text colour changes on the fly with a PHP application.

    Thanks for the enlightenment.

  5. #5
    Are You There? KDesigns's Avatar
    Join Date
    Oct 2003
    Location
    Your Monitor
    Posts
    1,147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not a problem! We all need a little 'enlightening' sometime!

    ChooseDaily.com - Follow on Twitter
    Top Resources for Web Designers and Developers Every Day!

  6. #6
    SitePoint Wizard
    Join Date
    Mar 2004
    Posts
    1,647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    kdesigns lol
    i cant believe...
    u designed a site for a funeral agency and...
    there r a link "advanced planing" !!!
    with sublink "start planing now!!!" lol lol
    incredible..never seen somehting like that...
    lol

  7. #7
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    which website is that?

  8. #8
    Are You There? KDesigns's Avatar
    Join Date
    Oct 2003
    Location
    Your Monitor
    Posts
    1,147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by reminder
    kdesigns lol
    i cant believe...
    u designed a site for a funeral agency and...
    there r a link "advanced planing" !!!
    with sublink "start planing now!!!" lol lol
    incredible..never seen somehting like that...
    lol
    Different right?

    Here's something probably more surprising .... I do between 3-5 sites a month for Funeral Homes... and 99% of them have that pre-planning info!
    ChooseDaily.com - Follow on Twitter
    Top Resources for Web Designers and Developers Every Day!

  9. #9
    SitePoint Wizard
    Join Date
    Mar 2004
    Posts
    1,647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    3.5 sites a month for funeral homes?
    ur great really!
    nice job

  10. #10
    Are You There? KDesigns's Avatar
    Join Date
    Oct 2003
    Location
    Your Monitor
    Posts
    1,147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! Surprisingly, Funeral Homes have turned to be a very valuable asset. But, like any website, it's about what you can offer your target audience. When they can show obituaries, have a place that families can leave online condolences, etc; it makes the site valuable to them. Heck, I've even done a couple where they actually do online viewings!
    ChooseDaily.com - Follow on Twitter
    Top Resources for Web Designers and Developers Every Day!


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
  •