1

I am trying to do a hover->highlight effect on the cells of the table in this fiddle, so they will appear to look like buttons. I can't use any javascript or CSS, but I can use HTML5. Does anyone know how to do it. I know there is an onmouseover attribute in HTML5, just not much experience yet.

Thanks!

11
  • That’s not possible. Why can’t you use CSS though? Commented Jun 3, 2012 at 23:09
  • 1
    onmouseover is JavaScript. And why can't you use CSS? Commented Jun 3, 2012 at 23:13
  • The reason i can't use JS or CSS is that I am trying to make custom content for a website which i am trying to build on sites.google.com. They do not allow you to add JS or CSS to the page. Commented Jun 3, 2012 at 23:15
  • 1
    They do, you just have to click 'Edit HTML' or something similar, then add style="<style here>" to the element. Commented Jun 3, 2012 at 23:17
  • @ShaquinTrifonoff Even then you cannot change pseudoclasses though – which you’d need to change the hover effect. Commented Jun 3, 2012 at 23:29

1 Answer 1

1

You can't. If you want to change the appearance of a given element based on user's behavior you have to use JavaScript (event based) or the CSS pseudo class :hover.

However, if you can edit the HTML of your content, then you should be able to insert a custom <style> element or add event listeners. Note that the first isn't valid in HTML4*, in HTML5 you can use the scoped attribute to style only a given scope (but I don't think this behavior is implemented in any browser yet).

*This solution should work, even if the resulting code HTML4 isn't valid any more.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.