×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Strange that Thumbs Up/Down Move Around?

Strange that Thumbs Up/Down Move Around? 10 years 11 months ago #20654

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
I find it strange that when hovering over comments the thumbs up and down slightly move. :huh:

This is because on hover it's adding both padding and a border. Fortunately I came up with a clean fix for this:

In the CSS file go to .ccomment-voting and add the following code:
padding: 1px 0 1px 2px;
border: 1px solid transparent;
transition: all 0.3s linear 0s;

(don't forget to remove the padding that was already there)

Then go to .ccomment-comment > div:hover .ccomment-voting and remove the following:
padding: 1px 0 1px 2px;

This makes for a clean hover. The transition property isn't needed but looks quite nice in my opinion. :)

Strange that Thumbs Up/Down Move Around? 10 years 11 months ago #20661

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Move around? I don't see this happening with a default joomla template?

Strange that Thumbs Up/Down Move Around? 10 years 11 months ago #20675

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
This happens even on CompoJoom! :P I created a video demonstrating what I mean:

(be sure to view full screen with the 1080p setting on for quality to see it clearly)



Notice the thumb icons move on both FireFox and Google Chrome on your site. This is because you tried to make up for the border that is added on hover by changing it's padding but having no border on non hover. So to fix this I removed the padding on hover. I replaced the padding of the non hover (as seen in the original post) and created both a non visible border and a visible border (right now border only appears on hover) so that nothing moves. The transition was just to make it look smooth on hover.

Strange that Thumbs Up/Down Move Around? 10 years 11 months ago #20681

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
All righty! I see what you mean. I actually never thought that the buttons are moving - I thought that because of changing the background the buttons actually give a "depth" illusion... Thanks for the fix! I'm going to add it to the template right away!

Cheers,
Daniel
The following user(s) said Thank You: Josh Lewis

Strange that Thumbs Up/Down Move Around? 10 years 11 months ago #20702

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
Agreed that the changing backgrounds is a nice addition. The moving icons was the concern. ;) Will the transition part be added? (transition: all 0.3s linear 0s;)

Strange that Thumbs Up/Down Move Around? 10 years 10 months ago #21232

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
I tested RC2 and did not see the CSS I added above. In other words the thumb icons are still moving around. :huh: I inspected the CSS just to be sure which it was not there. Even on this site the thumb icons move around. Perhaps you forgot to add it to the core version?

Strange that Thumbs Up/Down Move Around? 10 years 10 months ago #21234

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
:oops: Oooops. I forgot about that. But now I added the code and it will be there for the stable version. (it is already in the latest dev release)

thank you!
  • Page:
  • 1
Time to create page: 0.131 seconds