473,396 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Behavior of first-line

Hello,

My pages contain paragraphs that are 'remarks'. These are intended to
have the first line underlined, (this is the word 'note' or 'remark'),
followed by the text of the remark, which should be indented. Strange
enough the underline works as intended, but the indentation gets
swapped; i.e. the first line gets indented, but the remainder doesn't.
To see it on the complete page, please check:
http://www.hlasm.com/english/course1.htm

My style sheet contains the following:
<quote>
/* remarks: underline first line and indent remainder */
p.remark {
text-indent : 2% }
p.remark:first-line {
text-decoration : underline;
text-indent : 0% }
</quote>

A sample bit of html that uses this is:
<quote>
<p class="remark">Note 1<br />
This course covers the Assembler and the application-programmer
oriented hardware instructions that have been available from the
introduction of the S/360 and that were added over the first 20 years
or
so of the architecture. It is estimated that 90% of existing
Assembler
applications use only the instructions covered in this course.</p>
</quote>

Probably I'm missing something pretty obvious. Any hint to help me
repair the lay-out would be highly appreciated. Thanks in advance.

Abe F. Kornelis.
Jul 20 '05 #1
6 2608
a.********@pinkroccade.com (Abe Kornelis) wrote:
My pages contain paragraphs that are 'remarks'. These are intended to
have the first line underlined, (this is the word 'note' or 'remark'),
followed by the text of the remark, which should be indented. Strange
enough the underline works as intended, but the indentation gets
swapped; i.e. the first line gets indented, but the remainder doesn't.
To see it on the complete page, please check:
http://www.hlasm.com/english/course1.htm

p.remark {
text-indent : 2% }
p.remark:first-line {
text-decoration : underline;
text-indent : 0% }


text-indent only applies to the first line anyway.
http://www.w3.org/TR/CSS21/text.html...ef-text-indent

So you want something like this:
p.remark {
text-indent : -2%;
padding-left: 2%;
}
p.remark:first-line {
text-decoration : underline;
}

cheers,
Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2
a.********@pinkroccade.com (Abe Kornelis) wrote:
My pages contain paragraphs that are 'remarks'. These are intended to
have the first line underlined, (this is the word 'note' or 'remark'),
followed by the text of the remark, which should be indented. Strange
enough the underline works as intended, but the indentation gets
swapped; i.e. the first line gets indented, but the remainder doesn't.
To see it on the complete page, please check:
http://www.hlasm.com/english/course1.htm

p.remark {
text-indent : 2% }
p.remark:first-line {
text-decoration : underline;
text-indent : 0% }


text-indent only applies to the first line anyway.
http://www.w3.org/TR/CSS21/text.html...ef-text-indent

So you want something like this:
p.remark {
text-indent : -2%;
padding-left: 2%;
}
p.remark:first-line {
text-decoration : underline;
}

cheers,
Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3
Steve,

thanks, I'll give it a try...

Abe.
Jul 20 '05 #4
Steve,

thanks, I'll give it a try...

Abe.
Jul 20 '05 #5
a.********@pinkroccade.com (Abe Kornelis) wrote:
My pages contain paragraphs that are 'remarks'. These are intended to
have the first line underlined, (this is the word 'note' or
'remark'),
Underline should rarely be used for anything but links on the Web. It
is natural to expect that underlined "Note 1" is a link to something,
probably an unabridged version of the note. (We would expect the color
to be special too, but it is so common these days that authors mess
around with link colors that we expect a text to be link if it is
underlined, even if it has the same color as surrounding text.) Using
italics would be bettter.
followed by the text of the remark, which should be indented.
So it should look a bit like "Note" were a heading for the subsequent
text, right?
<p class="remark">Note 1<br />
This course covers the Assembler and the application-programmer - - applications use only the instructions covered in this course.</p>


Whenever an author types <br> (or the kewl & pointless variant <br />),
he should take a BReak and think about what he is really doing.

It really looks like "Note 1" should be a heading, so

<div class="remark"><h3>Note 1</h3>
<p>This course - -.</p></div>

might be the best markup, maybe with

..remark h3 { font-size: 100%; font-weight: normal; font-style: oblique;
margin: 1.3em 0 0 0; }
..remark p { margin: 0 0 1em 1em; }

(I would use the em unit rather than percentage when specifying the
indentation. When the canvas is narrow, e.g. 2% of the width gets
rather small and looks more like an error than an intentional stylistic
effect.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #6
a.********@pinkroccade.com (Abe Kornelis) wrote:
My pages contain paragraphs that are 'remarks'. These are intended to
have the first line underlined, (this is the word 'note' or
'remark'),
Underline should rarely be used for anything but links on the Web. It
is natural to expect that underlined "Note 1" is a link to something,
probably an unabridged version of the note. (We would expect the color
to be special too, but it is so common these days that authors mess
around with link colors that we expect a text to be link if it is
underlined, even if it has the same color as surrounding text.) Using
italics would be bettter.
followed by the text of the remark, which should be indented.
So it should look a bit like "Note" were a heading for the subsequent
text, right?
<p class="remark">Note 1<br />
This course covers the Assembler and the application-programmer - - applications use only the instructions covered in this course.</p>


Whenever an author types <br> (or the kewl & pointless variant <br />),
he should take a BReak and think about what he is really doing.

It really looks like "Note 1" should be a heading, so

<div class="remark"><h3>Note 1</h3>
<p>This course - -.</p></div>

might be the best markup, maybe with

..remark h3 { font-size: 100%; font-weight: normal; font-style: oblique;
margin: 1.3em 0 0 0; }
..remark p { margin: 0 0 1em 1em; }

(I would use the em unit rather than percentage when specifying the
indentation. When the canvas is narrow, e.g. 2% of the width gets
rather small and looks more like an error than an intentional stylistic
effect.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Andres Eduardo Hernando | last post by:
Hi, I'm not entirely sure this is the right group to ask this question, but I saw a similar one above, and the group's charter is not clear enough about it, so, here I go: ;) What is the...
3
by: ThunderMusic | last post by:
Hi, I'm trying to have a MSN Messenger like form/app closing behavior. When I click on the X button, I only want the form to disappear and when I double-click on the notify icon or right-click...
7
by: Dave Hansen | last post by:
OK, first, I don't often have the time to read this group, so apologies if this is a FAQ, though I couldn't find anything at python.org. Second, this isn't my code. I wouldn't do this. But a...
15
by: shablool | last post by:
Hi all, Two distinct compilers give different output for the following code: #include <iostream> #include <string> int main(void) { std::string s("0124"); s.replace(0, 3,...
2
by: Bruno van Dooren | last post by:
Hi All, i have some (3) different weird pointer problems that have me stumped. i suspect that the compiler behavior is correct because gcc shows the same results. ...
4
by: Frank Reichenbacher | last post by:
In MS Access VB, which I have been using for several years, the default enter key behavior in a textbox is identical to the tab key. Data are read and the focus moves to the next control in the tab...
6
by: reynard | last post by:
I have a page that uses this doctype <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> but when I change to this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
1
by: Nicholas Palmer | last post by:
Hi all, Got a question about the AspCompat=true page property. First a little background. We have an ASP.NET app that uses two COM components. The first is the Microsoft OWC 11 components and...
0
by: Joel Hedlund | last post by:
Hi! I'm developing a pygtk application where I need to show images zoomed in so that the user can see individual pixels. gtk.gdk.Pixbuf.scale() seemed ideal for this, but if I set offset_x and...
33
by: coolguyaroundyou | last post by:
Will the following statement invoke undefined behavior : a^=b,b^=a,a^=b ; given that a and b are of int-type ?? Be cautious, I have not written a^=b^=a^=b ; which, of course, is undefined....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.