Forums

This topic is locked

I Need Space, Man (a really small one)

Posted 26 Nov 2006 16:10:09
1
has voted
26 Nov 2006 16:10:09 Mark Forman posted:
<b>Crew...</b>

I need to insert a small indent on one line only of a paragraph (which resides in a layer.) I don't want to use a typical indent, 'cause it's too wide for this instance.

Is there any way to just add a really small, invisible space...as a mini indent...maybe only 5 or 6 pixels in width...to the beginning of a sentence?

Thanks,

<b>mark4man</b>

Replies

Replied 27 Nov 2006 00:19:57
27 Nov 2006 00:19:57 Alan C replied:
in your CSS define a class . . .

.indentedText {
text-indent:5px;
}

the indent applies to the first line of paragraph and being a class you can apply it as and where needed, set the indent from 1px to whatever, or a % or any measurement you like. As it's CSS you can change all the indents later in just one place.
Replied 27 Nov 2006 04:10:17
27 Nov 2006 04:10:17 Mark Forman replied:
<b>Alan...</b>

Thanks. I'm not applying it to an entire paragraph, tho...I'm applying it to only one line <i>within</i> that paragraph. How would that work?

Thanks,

<b>mark4man</b>
Replied 27 Nov 2006 06:35:23
27 Nov 2006 06:35:23 Alan C replied:
mmmm, that's a really good question <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>

the CSS would add the indent to the first line of the paragraph, then the rest would flow to fit whatever space was available. I've been concentrating on fluid layouts so that whatever width window is available my pages reflow to fit, or keeping in a fixed width in the centre of the page with variable but equal margins either side.

This will do it . . .

.moreSpace {
display:inline;
margin-right:15px;
}

moreSpace is a class that can be applied to anything, but in your case you can apply it to a character, say the last of a word, it will add a right margin of whatever you specify and dispaly that inline with the text, the benefit of this is that it will reflow with the text so the extra space will always be where you want it.
Replied 27 Nov 2006 17:04:29
27 Nov 2006 17:04:29 Mark Forman replied:
<b>Alan...</b>

Thanks very much.

So...the code would get pasted ahead of the line in question?...as per the following example:

[If I wanted the paragraph to read]:

The old brown cow jumped
[15 pixel space]through the barn door and onto
the freeway below, to it's surprise.

[The code would be?]:

The old brown cow jumped
.moreSpace {
display:inline;
margin-right:15px;
}
through the barn door and onto
the freeway below, to it's surprise.

No wait...that doesn't make sense either. I'm lost.

<b>mark4man</b>



Edited by - mark4man on 27 Nov 2006 17:05:29

Edited by - mark4man on 27 Nov 2006 17:11:52
Replied 27 Nov 2006 18:52:53
27 Nov 2006 18:52:53 Alan C replied:
Mark

I can't see how to post HTML to this forum, so I've put a page here

www.canadianlife.info/space/

what you should see is the sentence with the extra space after the letter d of jumped, view source to see the style and how to apply it.

The space gets attached to the last letter of the preceding word.

If you're using DW then you should be able to apply the class by selecting the character or word that you want the space after, then selecting the class fromthe Style dropdown menu in the Properties inspector. CSS can do all sorts of things but . . . it's not easy to get used to <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

Replied 27 Nov 2006 23:47:49
27 Nov 2006 23:47:49 Mark Forman replied:
<b>Alan...</b>

Thanks a million...that works well.

I must be really striking out today, tho...my properties inspector (assuming that's the window at the bottom of the page) doesn't show any kind of style menu when the text in question is selected.

I'll use the code you gave me, tho.

Thanks again,

<b>mark4man</b>
Replied 28 Nov 2006 18:30:03
28 Nov 2006 18:30:03 Alan C replied:
Mark

great <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> news

Most likely you are using different version of DW, in v8 there is a styles dropdown box in the properties inspector, it shows the styles as they will appear in the page, it makes life a lot easier - but it can still all be done with notepad or bbedit

Reply to this topic