By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,042 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,042 IT Pros & Developers. It's quick & easy.

indent first line

P: n/a
Lets say we have a paragraph that wraps several lines. I'd like to
indent the first-line a bit.

The first-line pseudo class sprang to mind, but you can't set a left
padding there.

Perhaps something else?

Jeff
Oct 31 '08 #1
Share this Question
Share on Google+
14 Replies


P: n/a
Jeff wrote:
Lets say we have a paragraph that wraps several lines. I'd like to
indent the first-line a bit.

The first-line pseudo class sprang to mind, but you can't set a left
padding there.

Perhaps something else?
text-indent: (property)

"This property specifies the indentation of the first line of text in a
block."
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Oct 31 '08 #2

P: n/a
In article <xb******************************@earthlink.com> ,
Jeff <jeff@spam_me_not.comwrote:
Lets say we have a paragraph that wraps several lines. I'd like to
indent the first-line a bit.

The first-line pseudo class sprang to mind, but you can't set a left
padding there.

Perhaps something else?
If for some reason you don't want to use text-indent: 2em;, then perhaps:

<p>&nbsp;Lorem ipsum dolor...</p>

And you can control by adding more non-breaking spaces. Just don't add
more than will fit on a line. <g>

--
dorayme
Oct 31 '08 #3

P: n/a
dorayme wrote:
In article <xb******************************@earthlink.com> ,
Jeff <jeff@spam_me_not.comwrote:
>Lets say we have a paragraph that wraps several lines. I'd like to
indent the first-line a bit.

The first-line pseudo class sprang to mind, but you can't set a left
padding there.

Perhaps something else?

If for some reason you don't want to use text-indent: 2em;, then perhaps:
No, I just forgot about it and didn't see it when I googled. Seems
pretty obvious now!

There's lots of stuff I've never used because the support level was
low when I first learned about it, I think for most of CSS2, that's no
longer true.

Jeff
>
<p>&nbsp;Lorem ipsum dolor...</p>

And you can control by adding more non-breaking spaces. Just don't add
more than will fit on a line. <g>
Oct 31 '08 #4

P: n/a
In article <4e******************************@earthlink.com> ,
Jeff <jeff@spam_me_not.comwrote:
dorayme wrote:
In article <xb******************************@earthlink.com> ,
Jeff <jeff@spam_me_not.comwrote:
Lets say we have a paragraph that wraps several lines. I'd like to
indent the first-line a bit.

The first-line pseudo class sprang to mind, but you can't set a left
padding there.

Perhaps something else?
If for some reason you don't want to use text-indent: 2em;, then perhaps:

No, I just forgot about it and didn't see it when I googled. Seems
pretty obvious now!

There's lots of stuff I've never used because the support level was
low when I first learned about it, I think for most of CSS2, that's no
longer true.

Jeff

<p>&nbsp;Lorem ipsum dolor...</p>

And you can control by adding more non-breaking spaces. Just don't add
more than will fit on a line. <g>
Fair enough. I just went out for a walk and was amused to work out how
many ways I could think of to indent the first line of a paragraph if
God suddenly tossed text-indent into outer space as a punishment to
human beings for their desires for Fancy.

--
dorayme
Oct 31 '08 #5

P: n/a
On 2008-10-31, dorayme <do************@optusnet.com.auwrote:
[...]
Fair enough. I just went out for a walk and was amused to work out how
many ways I could think of to indent the first line of a paragraph if
God suddenly tossed text-indent into outer space as a punishment to
human beings for their desires for Fancy.
How about

p:before
{
content: "";
padding-left: 2em;
}
Oct 31 '08 #6

P: n/a
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
On 2008-10-31, dorayme <do************@optusnet.com.auwrote:
[...]
Fair enough. I just went out for a walk and was amused to work out how
many ways I could think of to indent the first line of a paragraph if
God suddenly tossed text-indent into outer space as a punishment to
human beings for their desires for Fancy.

How about

p:before
{
content: "";
padding-left: 2em;
}
Nice.

God would likely toss out span too if anyone used

span {padding-left: 2em;} with

<p><span>Lorem ipsum dolor ...</span></por even

<p><span>Lorem</spanipsum dolor ...</p>

unless... unless He was a bit sentimental about MacIE5 where this works
but p:before does not. <g>

--
dorayme
Oct 31 '08 #7

P: n/a
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
On 2008-10-31, dorayme <do************@optusnet.com.auwrote:
[...]
Fair enough. I just went out for a walk and was amused to work out how
many ways I could think of to indent the first line of a paragraph if
God suddenly tossed text-indent into outer space as a punishment to
human beings for their desires for Fancy.
How about

p:before
{
content: "";
padding-left: 2em;
}

Nice.

God would likely toss out span too if anyone used

span {padding-left: 2em;} with

<p><span>Lorem ipsum dolor ...</span></por even

<p><span>Lorem</spanipsum dolor ...</p>

unless... unless He was a bit sentimental about MacIE5 where this works
but p:before does not. <g>
It's a bit difficult imagining any $DEITY getting sentimental about
MacIE5, although I suppose it was still an improvement on it's
predecessors.

Now, $DEVIL, on the other hand... (it's all in the details!)
Oct 31 '08 #8

P: n/a
In article <no****************************@news1.chem.utoront o.ca>,
David Stone <no******@domain.invalidwrote:
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
....
unless... unless He was a bit sentimental about MacIE5 where this works
but p:before does not. <g>

It's a bit difficult imagining any $DEITY getting sentimental about
MacIE5,
You know, it is still nearly the only browser on my machine that fires
up in 2 or at most 3 secs. The "nearly" is put in because I notice my
recently updated Safari (now 3) is very quick too. I know for a fact
that God is mightily impatient. (If He had not been impatient, He would
have let let evolution do its work instead of rushing the job in six
days. I think, therefore, there is a case to be made that he would look
fondly on this IE browser. And, I assume it hardly needs argument that
He would be using a Mac.)

--
dorayme
Oct 31 '08 #9

P: n/a
dorayme wrote:
You know, it is still nearly the only browser on my machine that fires
up in 2 or at most 3 secs.
For the record, Google Chrome holds the record on my system, barely over
two seconds unless the system is busy. IE6 clocked in at 7 seconds, by
comparison.

I haven't used it for a couple of days, and don't think that XP preloads
stuff that it knows I'll use in the future. So it is unlikely that it
was cached. My PC is a two-year old "commercial use" job, so nothing
very exciting.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Nov 2 '08 #10

P: n/a
In article <mu******************************@brightview.com >,
Swifty <st***********@gmail.comwrote:
dorayme wrote:
You know, it is still nearly the only browser on my machine that fires
up in 2 or at most 3 secs.

For the record, Google Chrome holds the record on my system, barely over
two seconds unless the system is busy. IE6 clocked in at 7 seconds, by
comparison.

I haven't used it for a couple of days, and don't think that XP preloads
stuff that it knows I'll use in the future. So it is unlikely that it
was cached. My PC is a two-year old "commercial use" job, so nothing
very exciting.
mmm... never considered caching as a factor (yes, don't worry, I
appreciated your witty remark about "fore-caching"). At least on my old
Mac (about 7 years old) FF with all it history and past knowledge of me
still takes what seems like months to fire up and yet Safari with even
more history and use is ready for action in a jiffy.

FF being asked to start behaves like Harrison Ford in Witness when he
was woken by a the Granddad at 4 am to do the milking, and Charlton
Heston in The Big Country by Gregory Peck to do some fightin'. In both
there was a bit of a scene.

I get the feeling that FF is talking to elsewhere when I ask it to
start. Maybe the CIA?

"Its that crazy down under again... are we all in place...?"

--
dorayme
Nov 2 '08 #11

P: n/a
On 2008-11-02, dorayme <do************@optusnet.com.auwrote:
[...]
FF being asked to start behaves like Harrison Ford in Witness when he
was woken by a the Granddad at 4 am to do the milking, and Charlton
Heston in The Big Country by Gregory Peck to do some fightin'. In both
there was a bit of a scene.

I get the feeling that FF is talking to elsewhere when I ask it to
start. Maybe the CIA?
Probably Google, whom the CIA can easily get the information from if
they want it. You should check with tcpdump.
Nov 2 '08 #12

P: n/a
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
On 2008-11-02, dorayme <do************@optusnet.com.auwrote:
[...]
FF being asked to start behaves like Harrison Ford in Witness when he
was woken by a the Granddad at 4 am to do the milking, and Charlton
Heston in The Big Country by Gregory Peck to do some fightin'. In both
there was a bit of a scene.

I get the feeling that FF is talking to elsewhere when I ask it to
start. Maybe the CIA?

Probably Google, whom the CIA can easily get the information from if
they want it. You should check with tcpdump.
It may also be checking for updates, both for itself and any plugins
or extensions. My sense here is that FF 3 is a little faster starting
up on my iMac than FF 2 was, although I never really timed either of
them.

Incidentally, does anyone know whether there is likely to be a
FF3-compatible FireBug extension any time soon? If not, are there
any good alternatives?
Nov 3 '08 #13

P: n/a
David Stone wrote:
Incidentally, does anyone know whether there is likely to be a
FF3-compatible FireBug extension any time soon? If not, are there
any good alternatives?
Is now soon enough for you? I didn't do anything out of the ordinary,
and Firebug updated itself when I moved to FF3. I'm on FF 3.0.3 and
Firebug 1.2.1

I have the feeling that I'm missing something obvious here.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Nov 3 '08 #14

P: n/a
In article <yp******************************@brightview.com >,
Swifty <st***********@gmail.comwrote:
David Stone wrote:
Incidentally, does anyone know whether there is likely to be a
FF3-compatible FireBug extension any time soon? If not, are there
any good alternatives?

Is now soon enough for you? I didn't do anything out of the ordinary,
and Firebug updated itself when I moved to FF3. I'm on FF 3.0.3 and
Firebug 1.2.1

I have the feeling that I'm missing something obvious here.
Ok, apparently I've been missing something. The version of Firebug
I seem to have is 1.05. When I updated from FF2 to FF3, it alerted
me that the version of Firebug was incompatible with FF3, and that
_no_ updated version was available. In fact, if I go into Tools ->
Add ons -Extensions, and use the drop-down menu for Firebug to
look for an update, it STILL tells me this!

Foolishly, I believed what the software told me - I really ought
to know better by now!

I've uninstalled the old Firebug, and am currently sitting here
waiting for the new version to install. It seems to be taking a
very long time. (Actually, updating NoScript through FF3 also
seems to be very slow, and also rather hit-and-miss - sometimes
it completely fails to connect or download the update!)

....

Ok, restarting FF3...

.... and Firebug 1.2.1 is present, but I can't seem to access the
Preferences (the button in the Add ons->Extensions pane is not
responding)

Grr....
Nov 3 '08 #15

This discussion thread is closed

Replies have been disabled for this discussion.