473,586 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2621
a.********@pink roccade.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:fir st-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.********@pink roccade.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:fir st-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.********@pink roccade.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.********@pink roccade.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
2860
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 standard behavior (if any) when the same name is attached to more than one field in a <form>? An example (that closely resembles the problem I'm working...
3
2308
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 on it and choose Open from the context menu, I want the form to reappear. For that, I got the point covered. Even when the form is minimize, the...
7
1690
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 colleague did, got an unexpected result, and asked me why. I think I can infer what is occurring, and I was able to find a simple work-around. But...
15
2567
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, s).replace(s.size(), 6, s);
2
1530
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. ---------------------------------------------- //example 1: typedef int t_Array; int main(int argc, char* argv)
4
2753
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 order. In VB.NET the default behavior is that data are read, but the focus does not change. I find this to be extremely bad form management. Users...
6
2280
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" "http://www.w3.org/TR/html4/loose.dtd"> it breaks my javascript. Particularly I have a code that try to set element.style.left, when I use the...
1
2970
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 the second is a custom VB6 COM component. So I was reading about AspCompat=true and it seemed like it would be a good fit for our app. From what I can...
0
1242
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 offset_y to anything other than 0, the resulting image is heavily distorted and the offset is wrong. I've searched the internet for any snippet of...
33
2819
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. I am having some confusion with the former statement! Also, state the reason for the statement being undefined!
0
7912
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.