Jump to content

[SOLVED] PHP in html files


cearlp

Recommended Posts

Hello,

Don't know if this is the correct forum for my question but here goes...

I use PHP within an html file to generate table data. The table data are links and by default they are underlined. I want to eliminate the underlining and have tried to do this using CSS and a rule for anchors. Ex: a {text-decoration: none;}  This does not work and I can only think that it is because the <td>.....</td> is generated with an echo statement in PHP.

Here is the code:

echo "<tr style='background color:$bgcolor;'><td><a href='".$_SERVER['PHP_SELF']."?memberid=$id'>$name</a></td></tr>";

The html page is rendered correctly and the links work as planned. I just want to get rid of the underlines under the name.

Any thoughts?

 

Link to comment
Share on other sites

All php code is executed before it is sent to the browser, so there's no way php could mess up your css. Debug as if php isn't even there (assuming the html under view-source looks okay). Is there another css property below the one you're defining that overrides the anchor setting you're trying to use to change the underlining?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.