The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS selectors question

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #32753

    Hi I am a 14 year old webdesigner

    I want to ask one question , all these selectors are bit confusing but what i want to achieve is the follwing

    I have a h1 tag and i want then when user hovers on it its first word’s (span in h1 ) color changes to red (remember not whole h1 but one first word in h1)

    I have tried doing this with css and javascript but without success

    Here is my javascript attempt

    Saurabh Orange

    When i run it in firefox 4 then the whole h1 changes to red which i dont want please tell me both the css way (css3 will also be accepted0 and javascript way



    Please can anyone help it is urgent


    what? why don’t u use css instes of js?!¿


    or may be pseudo


    h1:hover span{color: red;}
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.