If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Style for PHP echo Links

Hello,

I have created a php echo within a divider to show links to extra pages within a table, it should look like '1 2 3 >' but all I can see is the text for the current page I am on and NOT the other page links and the arrows. Here is the code:

As you can see the style for the div link is working only to display the current page number (which isn't actually a link) but not on the links themselves. I need a way to assign the php echo to a class itself so I can set the links... for example

It's only doing what you tell it to do. If you want it to display more links you will have to loop over the entire array. This should be in the php section in any case.

The PHP is correctly displaying the links it's just that they are white (except the current page which isn't actually a link) but when I highlight them with my mouse I can see them. I'm just looking for a way to stylize them. Thanks

The code ttkim used still doesn't work... the thing is I show the underline on 'Hover' and when I do that I can see the underline but the links still aren't readable although I can click on them. I have no idea why the text-decoration property is working but the color property is not. Any thoughts?

The code ttkim used still doesn't work... the thing is I show the underline on 'Hover' and when I do that I can see the underline but the links still aren't readable although I can click on them. I have no idea why the text-decoration property is working but the color property is not. Any thoughts?

You still haven't shown us the HTML that the style applies to. That's what we need to see. You're wasting everyone's time by not showing it.

You do not understand. You are still showing us the php code. The browser NEVER sees the php part of the code. It only sees the delivered HTML. To get that you have to open the page with your browser and choose the option 'view source'. Then you select all of that, then copy and paste it into a message or text file. Nowhere in it will you see <?php . That is what the style applies to.

You do not understand. You are still showing us the php code. The browser NEVER sees the php part of the code. It only sees the delivered HTML. To get that you have to open the page with your browser and choose the option 'view source'. Then you select all of that, then copy and paste it into a message or text file. Nowhere in it will you see <?php . That is what the style applies to.

I see what the problem is... I created the style for the DIVIDER but I still need to create a class for the individual page links and stylize that. How exactly do I create and ID or class for those 'a' links since I can't even see them in the regular HTML?

Well, if that CSS code sample you posted is what you used, that's not what I suggested.

Your CSS is styling the "#page-links" itself. I said to style "#page-links a".

If that still doesn't work, then we would need one of these things:

1. A link to the site
2. All your stylesheets and in the correct order
3. Or, you would have to show us what "$objtrucks->Links;" is doing so we can add classes like you wanted.

I tried the "#page-links a" and that didn't work either. The "objtrucks->Links;" is creating all of the "<a href="#" onclick="return refreshPage('2');">2</a>" for the individual pages and "> >>". I would like if I could attach a class to all of the 'a' codes for the "objtrucks->Links;" and then set a style for the class to display the links properly.

Yes, we know what objtrucks->Links does, but we need to see the actual code if you want us to help you attach a class to it.

If not, you have to show your stylesheet (and I mean all of it) or a link to your page. Most likely, you are missing something from your stylesheets because what I suggested should work. Something is overriding it.