Skip to main content
nigelh70638339
Inspiring
June 29, 2017
Answered

CSS for a href and a name tags

  • June 29, 2017
  • 1 reply
  • 1100 views

I have links to other pages in my site as well as a link back to the top of the page, but I also have anchors to certain places within my page.

Here is a small clip of a page

          <tr>

           <th></th>

           <th></th>

           <th><a href="#top">[top]</a></th>

           <th></th>

           <th></th>

           </tr>

         

        </tbody>

       

        <tr>

        <h3><th><a name="albion4westham2">Albion 4 West Ham United 2 (2016) (England)</a></th><!--own --></h3>

                 <h3><th><a name="alexabliss">Alexa Bliss (2017) (England)</a><!--own --></th></h3>

            <h3><th><a name="animalkeeper">Animal Keeper (2016) (England)</a></th><!--own --></h3>

                 <h3><th><a name="anna">Anna (2015) (England)</a></th><!--own --></h3>

              <h3><th><a name="applejack">Applejack (2014) (England)</a></th><!--own --></h3>

      

      </tr>

        <tbody>

       

       <tr>

          <td style="width:150px;"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Albion 4 West Ham 2','','images/stts/wba_back.gif',1)"><img src="images/stts/albion_4_west_ham_2.gif" alt="Albion 4 West Ham 2" name="Albion 4 West Ham 2" width="150" height="230" border="0"></a>

            <p>The Albion 4 West Ham United 0 card was available from the West Bromwich Albion shop and was to be played with the West Bromwich Albion pack.</p></td>

            <td style="width:150px;"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Alexa Bliss','','images/stts/alexa_bliss_back.gif',1)"><img src="images/stts/alexa_bliss.gif" alt="Alexa Bliss" width="150" height="230" id="Alexa Bliss"></a>

            <p>The Alexa Bliss card was to be found inside a 6 card packet inside the Wrestlemania 2017 DVD Boxset which was released through Asda from 5th June 2017.</p></td>

            <td style="width:150px;"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Animal Keeper','','images/stts/animal_keeper_back.gif',1)"><img src="images/stts/animal_keeper.gif" alt="Animal Keeper" name="Animal Keeper" width="150" height="230" border="0"></a>

            <p>The Animal Keeper was given away at Longleat Zoo and was to be played with the Longleat pack.</p></td>

          <td style="width:150px;"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Anna','','images/stts/anna_back.gif',1)"><img src="images/stts/anna.gif" alt="Anna" name="Anna" width="150" height="230" border="0"></a>

            <p>The Anna card was given away by the Entertainer shop with every Top Trumps purchase and was to be played with Frozen.</p></td>

            <td style="width:150px;"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Applejack','','images/stts/applejack_back.gif',1)"><img src="images/stts/applejack.gif" alt="Applejack" name="Applejack" width="150" height="230" border="0"></a>

            <p>The Applejack card was to be played with My Little Pony and was to be found inside My Little Pony Junior Monopoly and Guess Who.</p></td>

         

         </tr>

How can I make the #top text smaller without affecting anything else on the page.

Thanks in advance!

    This topic has been closed for replies.
    Correct answer osgood_

    Give the anchor tag a class:

    <a href="#top" class="back-to-top">[top]</a>

    Then use some css to style the tag:

    .back-to-top {

    font-size: 14px;

    }

    1 reply

    osgood_Correct answer
    Legend
    June 29, 2017

    Give the anchor tag a class:

    <a href="#top" class="back-to-top">[top]</a>

    Then use some css to style the tag:

    .back-to-top {

    font-size: 14px;

    }

    nigelh70638339
    Inspiring
    June 29, 2017

    Thank you! Works perfect!

    nigelh70638339
    Inspiring
    July 1, 2017

    I have another query regarding anchor tags and a href.

    My page contains a lot of anchor tags and there are also some links within some text.

    I have used css to style my links and they look and work as expected. The problem is, is that the H3 tags which contain the anchors also act the same as the links, with the exception of the actual link.

    <tr>

                <h3><th><a name="hawkeye">Hawkeye (2017) (USA)</a></th><!--own --></h3>

                <h3><th><a name="hawkman">Hawkman (2016) (England)</a></th></h3>

                <h3><th><a name="headofamenhotep">Head of Amenhotep IV (2010) (USA)</a></th></h3>

                <h3><th><a name="heungminson">Heung-Min Son (2016) (England)</a></th></h3>

                <h3><th><a name="horriblehistories">Horrible Histories (2009) (England)</a></th><!--own --></h3>

               

                </tr>

               

      <tbody>

               

                <tr>

                <td style="width:150px;"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Hawkeye USA','','images/stts/deadpool_back.gif',1)"><img src="images/stts/hawkeye_usa.gif" alt="Hawkeye" width="150" height="230" id="Hawkeye USA"></a>

      <p>The Hawkeye card was given away at DC NYCC - DC New York Comic Con 2016 and was to be played with the US <a href="usa/winning_moves.html#marveluniverse" title="Hawkeye">Marvel Universe</a>.</p></td>

                 <td style="width:150px;"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Hawkman','','images/stts/hawkman_rear.gif',1)"><img src="images/stts/hawkman.gif" alt="Hawkman" name="Hawkman" width="150" height="230" border="0"></a>

                <p>The Hawkman card was given away at HMV and was to be played with DC Comics.</p></td>

                <td style="width:150px;"><img src="images/no-title-card.gif">

                <p>The Head of Amenhotep IV card was made available at the Tutankhamun and The Golden Age of The Pharoahs exhibition in San Francisco, USA.<p></td>

                <td style="width:150px;"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Heung-Min Son','','images/stts/heung_min_back.gif',1)"><img src="images/stts/heung-min.gif" alt="Heung-Min Son" name="Heung-Min Son" width="150" height="230" border="0"></a>

                <p>The Hueng-Min Son card was found inside the <a href="england/winning_moves/2016.html#spursstars" title="Hueng-Min Son">Spurs Stars</a> pack.</p></td>

                <td style="width:150px;"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Horrible Histories','','images/stts/horrible_histories_back.gif',1)"><img src="images/stts/horrible_histories.gif" alt="Horrible Histories" name="Horrible Histories" width="150" height="230" border="0"></a>

                <p>The Horrible Histories 3D promo card was handed out by Hamleys as part of the Winning Moves launch of the 3D packs.<p></td>

               

             </tr>

    I have copied and pasted a part of my page that shows  the points in question.

    Thanks in advance!