Welcome! To use this support forum, please Login or Join Today!

   

Anchor tag adds blank line

{name}
Rank

Total Posts: 27

Joined 2011-10-20

PM

 

I find that an anchor tag:

<a name ="name1"></a


adds a blank line wherever it is placed. So far I have been able to work this into the design of the page, but now it is a problem. I would like to link to each individual in our “Officeholders” page (your “Designer Page” in Element) from a list at the top of the page, but using an anchor tag that then adds a blank line at each officeholder (if I put the anchor tag at the name of the person) will not work. (http://www.jcdems-wv.org/officeholders/)

The question is: (a) How to eliminate the extra space when setting an anchor tag; or (b) is there another way to link within the page?

I would also like to link to these specific individuals from outside the page, using the anchor tag. What is the link code for that?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

WordPress adds P tags wherever it feels like there should be one. The only way to kill the white-space on something like this would be to disable automatic paragraph formatting for that specific page/post.

http://www.simplethemes.com/theme-docs/synapse-docs#187

{name}
Rank

Total Posts: 27

Joined 2011-10-20

PM

 

Unfortunately the “wpautop” with a value of “false” does not prevent the line break caused by an anchor tag on your Staff Directory page.

<div class="one_half">
<
a name="doe"></a><h3>MrJohn Doe</h3

or

<div class="one_half">
<
a name="doe"><h3>MrJohn Doe</h3></a

Adding that “a name” anchor tag causes a line break (despite adding the “wpautop” custom field).
Any other suggestions?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

I’m not able to reproduce this behavior.

Are you sure you’re saving the custom field to the post?
http://www.screencast.com/t/8ACbL1O96sxN