Jump to content

Archived

This topic is now archived and is closed to further replies.

lazlo

Text Box/ Media Box - how to stop <a> from splitting

Recommended Posts

lazlo

Hi

I am trying to use a textbox or media box to contain an image with text below that is wrapped in an <a> - so i can then create a rollover effect (background of text changes colour when mouseover image), similar to http://www.droneboylaundry.com/

 

..within the Text and Embed HTML field I add:

 

<a href="#" title="xxx"><img src="[pl_site_url]/wp-content/uploads/2014/11/clothes03.fw_1.png" title="xxxxx"/>
<h3>CAMO ‘D’ TEE</h3>
<span class="amount">£19.95</span>
</a>
 
..once i publish and refresh, the <a> tag gets split around each part and <p> tags are added, which stops any rollover on image changing the now separate a link on the text
 
- see attached screen shot.
 
Is there a way to overcome this? How can I get the a tag to stop splitting or am i missing something?
 
many thanks for any help offered
 
 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

Wrap your code in a div and give then add a p tag and give that a class of zmt zmb. For example:

 

<div class="blah">

  <p class="zmt zmb">

    <a href="#" title="xxx"><img src="[pl_site_url]/wp-content/uploads/2014/11/clothes03.fw_1.png" title="xxxxx"/>

      <h3>CAMO ‘D’ TEE</h3>
        <span class="amount">£19.95</span>
    </a>
  <p>
</div>
 
zmt zmt are abbreviations of zero margin top, zero margin bottom. Give that a try.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

I have replied, but please bear in mind that we are unable to provide support to user created code, which that is.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • balfred1345
      By balfred1345
      Hi,
      I've got a client on a DMS ver. 1.1.9.1 site. Using WP 4.5.2.
      The site is clean from malware. And I've replicated the below problem with all plugins off except for DMS Pro Tools
      Here's the page: http://choralartsensemble.org/support/sponsors/
      When a textbox or column with textbox on the page are deleted, upon save and refresh one or more textboxes in the header and footer loses its content. This is a repeatable occurrence. 
      Can you please tell me how to fix this so it does not happen again? 
    • triggerfish
      By triggerfish+
      Media Box not taking Google Maps input
      I have the EMBED MAP code from Google (which I have done 100''s of times before),
      I input it into the TEXTBOX or MEDIABOX SAVE it, and as soon as I refresh the page the text is gone (and of course there is no map).
      I have rebooted, refresh cache, everything with no luck..it just will not take the google maps input...it will however take and save a simple text input.
      I am using WordPress 4.5.1
      DMSVersion: 2.2.1.1
      The google code is:
      <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2602.466376170749!2d-123.11645494869879!3d49.286507879230314!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x548671828dbf1c61%3A0x489cbb919c49d6e!2s325+Howe+St%2C+Vancouver%2C+BC+V6C+3N2!5e0!3m2!1sen!2sca!4v1461869255884" width="800" height="600" frameborder="0" style="border:0" allowfullscreen></iframe>
      The website and CONTACT PAGE ( the map is next to the CONTACT VALRI text, there is a textbox and media box there) are here:
      http://valufitness.com/contact-us/
      Your login is:
      http://valufitness.com/val-login/
      USer= ***
      pass= ****
       
    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • John Olsson
      By John Olsson+
      I have a problem with the regular textbox in pl5, in this case, the text goes in that container, but it will hide som of the text, as if the container itself won't fit?
      Is this some kind of bug or have I done something stupid, never happend before with pl5 doh, can I do something smart about it?
      Version: Version 5.0.108
      Look here: www.gastronova.co56.se

    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
×