Adding blank lines
-
I have a rather clunky workaround to overcome the WP editor’s deletion of blank lines. None of the proposed solutions I’ve seen have worked for me.
I created a small image the same colour as my background, then inserted it where I wanted the blank lines. By adjusting the height, I got a variable amount of unfilled space. I left the alignment as None so the stuff I’m pushing down the page doesn’t appear next to it.
It’s good to delete the Alt text as that appears momentarily where your blank image is.There are two quirks I’ve not yet resolved: 1 I can’t get the height small enough to only give me a single blank line, and as the height gets smaller and smaller, eventually you can’t get to the image in visual and have to edit its attributes in Text. 2 There seems to be a limit to the maximum height, too. You keep increasing the height but nothing happens. If I need more space I just add a second instance of the image.
No doubt someone will immediately respond with a much better solution!
The blog I need help with is: (visible only to logged in users)
-
Clunky indeed, for various reasons.
The web standard is no multiple spaces, no multiple line breaks or paragraph breaks, no empty paragraphs. The space above and below a paragraph isn’t a blank line, it’s a default margin or padding (defined in the CSS of the theme). So, the way to add extra space above and/or below a paragraph or an image is to use coding in the Text (=code) editor in order to modify its default margin (or padding, in the case of paragraphs). See this post of mine:
http://wpbtips.wordpress.com/2009/06/10/formatting-text-pt-1/
In the theme you’re using, you can use em values instead of px, for example:
<p style="margin-top:1.6em;">TEXT HERE</p>On your “personal investigadores” subpages you also need something else. To make each heading (professor’s name etc) start below the previous image instead of next to it, you don’t add extra space below the previous paragraph, you cancel the wrap-around effect of the left-aligned image. To do this, enclose the heading in this code:
<p style="clear:both;">HEADING HERE</p>If you need this plus extra space above the heading, you combine the two rules:
<p style="clear:both;margin-top:1.6em;">HEADING HERE</p>
Change the number to adjust the space.But I’ll have to remind you that the theme you’re using wasn’t designed for fixed combinations of texts and images. When one views your pages in a narrower screen, the theme will become narrower, so the texts will become longer, so they will no longer be centered in relation to the pictures.
-
To insert a blank line, personally I hit enter, type an ellipsis, and change the font colour to match my background (usually white).
That way it just appears as a blank line, unless someone highlights the text on the page.
-
It will show if someone highlights the text, it will show if someone copies the text, it will show in feeds and email notifications, it will show if someone has set their browser to display webpages in different colors.
-
This is terrific! I’ve experimented with style=”margin-top:2em” and style=”clear:both” achieved exactly what I wanted with no fiddling around at all.
Not only that, but I’ve realised that the BGS is running an out of date version of WP which is less rigorous about removing surplus blank lines. When they upgrade to the latest version of WP, that will break my website formatting. So this coming week I’ll be retrofitting @justpi’s code to the English version of the site, just to future-proof it a bit.
Thank you!
- The topic ‘Adding blank lines’ is closed to new replies.