By nhero on
I have three images in a block and Drupal is adding a line break after each image. I would like to figure out what is adding it so I can remove it. I have looked at block.tpl.php and didn't see anything in there.
I have three images in a block and Drupal is adding a line break after each image. I would like to figure out what is adding it so I can remove it. I have looked at block.tpl.php and didn't see anything in there.
Comments
How is the block created?
How is the block created? Through views? Is it an actual <br /> tag or a border style?
The block was added through
The block was added through Site building-> blocks -> add blocks. It is an actual
tag.
If the block is being created
If the block is being created by a module you installed, the HTML you want to edit is in the module folder. Navigate to your module folder and you should see either block.tpl.php or something along those lines. Check to see if the tag is being added there.
It sounds like a custom
It sounds like a custom block... something that you entered yourself, not generated by a module. If that's the case, then I'm wondering if you're using a rich-text editor that's the culprit. Have you tried looking at the html code in the block edit form?
... just an idea...
Anne
I figured this out. There is
I figured this out. There is a setting in site configuration-> input settings -> full html called line break converter. I had to untick this box.
Updated Solution!
As an update to this solution, on the current version (Drupal 7.37) you can change this setting at the following path:
Home » Administration » Configuration » Content authoring » Text formats » Full HTML
You must then uncheck the following option:
Convert line breaks into HTML (i.e.
<br>and<p>)Because you are providing Full HTML that you have likely prepared how you want, I would also suggest unchecking:
Convert URLs into links
This option is really needed only if you cannot trust/control that the content will be well-formed HTML:
Correct faulty and chopped off HTML
I would argue that those actually with the permission to use Full HTML should need none of these options to be checked; as they are trustworthy and can meet certain expectations. Otherwise, they should not have the permissions for this text format.