Note that there are some explanatory texts on larger screens.

plurals
  1. POinvisible links in display:visible
    text
    copied!<p>been lurking a while but this is my first post. Please go easy on me! :-)</p> <p>I've got a faq page set up in a table with a list of 'contents' and when the 'show' buttons are clicked the body becomes visible.</p> <p>When the display:none tr is changed to display:block by clicking the 'show' button it works except if I've got a <code>&lt;a href...&gt;</code> in the content of the tr. In that case the link is invisible unless I try to highlight the line.</p> <p><strong>JS looks like this -</strong> </p> <pre><code>&lt;script&gt; function hidetr(tr) { document.getElementById(tr).style.display="none"; } function showtr(tr) { document.getElementById(tr).style.display="block"; } &lt;/script&gt; </code></pre> <p><strong>HTML looks like this:</strong></p> <pre><code>&lt;tr&gt; &lt;th&gt;I want to search for registrations in a certain area/by a certain date/by some other criteria that the site does not allow?&lt;button onclick="showtr('faq5')"&gt;Show!&lt;/button&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr id="faq5" style="display:none" &gt; &lt;td&gt;Please &lt;a href="contactus.php" &gt;Contact Us&lt;/a&gt; with a summary of your requirements and purpose and if we are able to help we will do. At this time the search criteria on the site are purposefully limited. &lt;/td&gt; &lt;td&gt;&lt;button onclick="hidetr('faq5')"&gt;hide!&lt;/button&gt; </code></pre> <p>any ideas?</p> <p><strong>update</strong><br> had another look taking in to account Mr Lister's suggestion of removing the style from the row I want to hide/show - basically the link was still invisible.</p> <p>I've put the page and the CSS doc on to my desktop and loaded the page from there as I thought maybe it was pulling something down from the CSS. </p> <p>The link shows correctly with no changes other than the location the files are saved!</p> <p>now I'm really confused</p> <p><strong>update</strong> </p> <p>Sorted! well...not yet but I know what it is so should just take a few mins.</p> <p>On that main page I have a couple of PHP inclusions of other docs including my navbar which has some style markups in it. There's an a {color: white;} in there which is causing this link to be white too.</p> <p>I worked it out by discovering that if I changed the page to HTML rather than PHP that the color was correct so figured it must be something being included from the server side.</p> <p>Thanks to all for your comments, they did help me 1/ tidy up a few bits of code 2/ pointed me in the right direction.</p> <p>particular thanks to Mr Lister.</p> <p><strong>please can someone close this. It won't let me answer my own question as I'm new for 7 hours.</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload