I am printing two flags inside a block, but I am having a hard time with two br tags inside the span class when the page loads. They then disappear when I flag a node, but when I refresh the page, they're back again.

I can't seem to find out where they are coming from. Interestingly enough, I don't see the br tags around those same flags in a block created by the Flag Lists module. With these two br tags appearing and then disappearing, it's impossible to theme the block correctly.

Here's what I pulled from the page using Firebug:

<span class="flag-wrapper flag-seen-this-movie flag-seen-this-movie-79851">
<br>
<a class="flag flag-action flag-link-toggle flag-processed" rel="nofollow" title="Click if you have seen this movie." href="/flag/flag/seen_this_movie/79851?destination=node%2F79851&token=0a24ba2aade25de250e249497385c607">Seen this movie?</a>
<span class="flag-throbber">&nbsp;</span>
<br>
</span>

Any help is greatly appreciated.

Comments

AtlasX’s picture

Issue summary: View changes

Edited for code tags.

AtlasX’s picture

Issue summary: View changes

Edited.

AtlasX’s picture

Issue summary: View changes

Edited.

AtlasX’s picture

Okay, so I managed to use some CSS to hide the br tags, which I didn't know I could do. They still load, though. I'm still curious about it.

In case anyone has a similar problem one day, here's what I put into my theme's css:

span.flag-wrapper br {
  display: none;
}
joachim’s picture

Status: Active » Closed (cannot reproduce)

There are no br tags anywhere in the flag output -- this must be something that your theme is outputting somehow.

joachim’s picture

Issue summary: View changes

Edited.

sagannotcarl’s picture

Issue summary: View changes

I just found this note in the flag.tpl.php

* NOTE: This template spaces out the <span> tags for clarity only. When doing some advanced theming you may have to remove all the whitespace.

You might just try duplicating the template file and removing the whitespace around the spans.