×

Notice

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

TOPIC: Move voting numbers

Move voting numbers 14 years 5 months ago #9490

  • Andy
  • Andy's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Hi,

working away on my template and making good progress, however I need to move the voting result number and can't figure out how. If I change the padding in CSS the background image moves along with the number so they stay out of line :(

To show what I mean:


Any help getting these numbers aligned properly greatly appreciated

Andy

Move voting numbers 14 years 5 months ago #9501

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
To help you we will need a link to your page.

Move voting numbers 14 years 5 months ago #9513

  • Andy
  • Andy's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Is work in progress development site, not live.

www.andys-stuff.co.uk

I just need the vote count numbers moved a few pixels left without moving the background images

Cheers
Andy

Move voting numbers 14 years 5 months ago #9514

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ok, I see the problem.
The easiest way would be to open components/com_comment/joscomment/comment.class.php find the function voting_cell
and change it to this:
	public function voting_cell($mode, $num, $id) {
		return "<li><div id='$mode$id' class='voting_$mode' onclick='JOSC_voting($id,\"$mode\")'><span>$num</span></div></li>";
	}
 

then you can style the number with code like this:
.voting span {
margin-right: 10px;
}

i've added this change to 4.1 and it should appear in it this week.

Move voting numbers 14 years 5 months ago #9517

  • Andy
  • Andy's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Thanks for looking at this. Unfortunately that moves the background images too :(

Move voting numbers 14 years 5 months ago #9518

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
hm, try this. Change the padding value for this element to
#comment div.voting_no, #comment div.voting_no:visited {
padding: 2px 7px 2px 31px;
}
  • Page:
  • 1
Time to create page: 0.107 seconds