- Posts: 15
- Thank you received: 1
Guestbook current page highlight
- igorlaszlo
- Topic Author
- Offline
- New Member
Less
More
10 years 11 months ago #13500
by igorlaszlo
Guestbook current page highlight was created by igorlaszlo
Hello,
sorry to disturb you again, i just can not get over of some small things... i would like to highlight the current page number but i do not know how to do.
How do you change the following code that it gives a background color of the current <a> ? :
(list.php)
sorry to disturb you again, i just can not get over of some small things... i would like to highlight the current page number but i do not know how to do.
How do you change the following code that it gives a background color of the current <a> ? :
Code:
for ($i = 1; $i<=$totalpages; $i++)
{
echo " <div class='commentspages'><a href=\"list.php?page=$i&order=$order\"><b>$i</b></a></div> ";
}
echo "</center>";
(list.php)
Please Log in or Create an account to join the conversation.
10 years 11 months ago #13513
by Pete
DigiOz Webmaster
www.digioz.com
Replied by Pete on topic Guestbook current page highlight
It looks like you found the answer to this already, but you can basically either surround the page number with a "Span" tag and give that span a background color using the style attribute or define a class in the CSS file to do that for you.
Pete
Pete
DigiOz Webmaster
www.digioz.com
The following user(s) said Thank You: TestUser334
Please Log in or Create an account to join the conversation.
- igorlaszlo
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 1
10 years 11 months ago #13516
by igorlaszlo
Replied by igorlaszlo on topic Guestbook current page highlight
It seems today is a hard day, nothing works
I have two pages of messages... I added a class to the <a> tag as follows :
But in this case both page numbers will be the same color... what i would like that when i read the messages of the first page, the number "1" gets a different colour. When i read the messages of the second page, the number "2" changes the initial colour.
Is it possible to do it ? Or too complicated ? :whistle:
I have two pages of messages... I added a class to the <a> tag as follows :
Code:
for ($i = 1; $i<=$totalpages; $i++)
{
echo " <div class='commentspages'><a class='current' href=\"list.php?page=$i&order=$order\"><b>$i</b></a></div> ";
}
echo "</center>";
But in this case both page numbers will be the same color... what i would like that when i read the messages of the first page, the number "1" gets a different colour. When i read the messages of the second page, the number "2" changes the initial colour.
Is it possible to do it ? Or too complicated ? :whistle:
Please Log in or Create an account to join the conversation.
10 years 11 months ago #13519
by Pete
DigiOz Webmaster
www.digioz.com
Replied by Pete on topic Guestbook current page highlight
You would have to add a PHP code to check the current page number, and set a different span color based on what page you are on. So I guess you tell me if it sounds complicated or not.
DigiOz Webmaster
www.digioz.com
Please Log in or Create an account to join the conversation.
- igorlaszlo
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 1
10 years 10 months ago #13533
by igorlaszlo
Replied by igorlaszlo on topic Guestbook current page highlight
Hello pete,
thanks for all your replies... however i was very busy and now i can not check what you told me because all my websites are inaccessible, my host server is down since a week.
I will let you know the outcome later..;
Thanks again !
thanks for all your replies... however i was very busy and now i can not check what you told me because all my websites are inaccessible, my host server is down since a week.
I will let you know the outcome later..;
Thanks again !
Please Log in or Create an account to join the conversation.
Time to create page: 0.123 seconds