Anchor tag not working

94 views Asked by At

For this website ( http://carbondirect.net/ ) on the homepage, bottom right I want Sewage Odor Control to link to the page Activated Carbon and jump to the Sewage Odor Control section, but it is not working. It links to the Activated Carbon page, ignoring the anchor.

Based on some research, I tried adding this CSS, but it is still not working:

#sewage-odor-control {
position: fixed;
z-index: 10001;
display: inline-block; 
}

Did I do anything obviously wrong? If you are able to take a look, thank you.

2

There are 2 answers

0
Mike Covington On

Here is the relevant code from your site:

<div class="et_pb_toggle et_pb_toggle_close">
  <h5 class="et_pb_toggle_title">SEWAGE ODOR CONTROL</h5>
  <div class="et_pb_toggle_content clearfix">
    <span><a id="sewage-odor-control"></a></span>
    Wet wells and sewage-pumping stations need to be vented to atmosphere, the vapor that is exchanged is contaminated with H2S and mercaptan. They are highly odorous, pungent and extremely objectionable. Specialist impregnated carbon are used to remove H2S to the level below the odor threshold value. The patented products (US patent#6,858,192) invented by our factory are unique catalytic activated carbon not only with high capacity on absorption, but also hazard free during the handling and disposal of spent carbon.</p>
    <p><a href="http://carbondirect.net/wp-content/uploads/IMP-CD2015.pdf" target="null">IMP-KOH</a>, <a href="http://carbondirect.net/wp-content/uploads/SPEC-of-HiCOR.pdf" target="null">HiCOR</a>
  </div> <!-- .et_pb_toggle_content -->
</div> <!-- .et_pb_toggle -->

A couple weird things going on:

  • Line #5: have a closing </p>, but no opening <p>
  • Line #6: have an opening <p>, but no closing <\p>

Also, your anchor is not 'visible' when you first go to the site because the section is toggled closed (et_pb_toggle_close), so maybe that is causing a problem. What happens if you add the anchor the the header (which is readily visible)?

<h5 id="sewage-odor-control" class="et_pb_toggle_title">SEWAGE ODOR CONTROL</h5>
0
armezit On

The only thing you need is adding id="sewage-odor-control" to the target element:

<div id="sewage-odor-control" class="et_pb_toggle et_pb_toggle_close">