I’ve been trying to add empty spaces between some HTML text I’m using as a menu but that is always stripped by the browser.
I searched a bit and found that by using the “pre” tag I should be able to solve this issue. However, it doesn’t really work as I thought it would because now the text baseline is shifted down about 8px and distorting my layout. What is the trick to achieve what I want?
Example:
Instead of “Menu1 | Menu2”
I’d like to see “Menu1 | Menu2”
It was always my understanding that the PRE tag was used for showing code snippets, but in your case you should use:
which is the HTML equivalent of a space. So in your menu example it’d look like:
Menu1 | Menu2
So if you wanted to two spaces after the pipe character it’d look like:
Menu1 | Menu2
Try that and see if that works for you. You’ll have to write the code manually and also you’ll need to make sure Freeway doesn’t transform any of the special characters (not sure if it will).
I’ve been trying to add empty spaces between some HTML text I’m
using as a menu but that is always stripped by the browser.
I searched a bit and found that by using the “pre” tag I should be
able to solve this issue. However, it doesn’t really work as I
thought it would because now the text baseline is shifted down about
8px and distorting my layout. What is the trick to achieve what I
want?
Example:
Instead of “Menu1 | Menu2”
I’d like to see “Menu1 | Menu2”
This is easy to do and no pre tag needed. If your using a list for
your menu (ul or dl, for example) - a good idea, btw - I would use a
right margin for each list/menu item to achieve the spacing you want.
And if you’re using graphic images for links, which you’re not, you
could define a width for each link then use margins to space things
out. Something to keep in mind if you ever use graphic menu buttons in
this manner.
Here’s a very basic css example using a list:
ul li a {
margin-right: 8px;
}
This gives each link a right margin which would give you what you want
above.
When I saw my post I just realized that the four spaces I used before and after the pipe symbol were also stripped. Sorry, I didn’t know/realize this would happen.
I believe Dan’s reply is what I’m looking for and I’m trying it out now to see if it works. In the original example, what I wanted was for the menu to look like “Menu1 | Menu2” instead of “Menu1 | Menu2”
You need to simply type an Option-space in Freeway. will be the
code that gets output when you do that. Option-space is the shortcut
in just about all Mac programs for the non-breaking space character.
Walter
On Jun 18, 2010, at 1:28 PM, Dirk wrote:
Hi, I just got around to try what I read - and what I even tried
here successfully - but it failed.
Entering “& nbsp;” (without the space and quotation marks) in some
formatted HTML text on my web site simply printed as the text but
not a space.