Paragraph breaks in CSS formatted text

C

Cimbian

I would like to cut and paste textual content into my pages as I edit my site
but as the paragraph formatting is via CSS each new paragraph uses the same
top left origin.

My work-around is to edit the text to replace the paragraph breaks with
<BR><BR> but this is time consuming and error prone.

Am I missing something?
 
P

P@tty Ayers

Cimbian said:
I would like to cut and paste textual content into my pages as I edit my
site
but as the paragraph formatting is via CSS each new paragraph uses the
same
top left origin.

My work-around is to edit the text to replace the paragraph breaks with
<BR><BR> but this is time consuming and error prone.

Am I missing something?

What do you mean when you say that "the paragraph formatting is via CSS"?
Regardless of formatting, paragraphs should be marked up as paragraphs with
HTML:

<p>Here's my paragraph.</p>

And then styled (and possibly positioned) with CSS. Can you clarify the
situation so that we can make a recommendation? Posting a URL to the page,
or the page code, would be best.
 
C

Cimbian

I have unformatted text pasted onto the page. I then use a CSS style to
format it for font, colour AND position:

..BA_Main_Left { border:4px inset #FFFF00; font-family: Verdana; font-size:
10pt; text-align: justify; position: absolute;
left: 34; top: 215; width: 352; z-index: 1;
margin-left: 0;
margin-right: 0; margin-top: 0; padding: 5px;
background-color: #FFFFCC }

Each occurrence of <p> (only there from the cut'n'paste) is seen as a new
paragraph (obviously) but the Style is then re-applied so the positioning is
reset.
 
R

Ronx

Remove the positioning from the paragraph styles.
If you need to position the group of paragraphs, place them (un-positioned)
in a positioned layer:
<div id="paras">
<p>para 1</p>
<p>para 2</p>

<p>para n</p>
</div>

and in the CSS

#paras {position: absolute; left: 34; top: 215; width: 352; z-index: 1;}
#paras p {border:4px inset #FFFF00; font-family: Verdana; font-size:
10pt; text-align: justify;margin-left: 0;
margin-right: 0; margin-top: 0; padding: 5px;
background-color: #FFFFCC ;}
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/


Cimbian said:
I have unformatted text pasted onto the page. I then use a CSS style to
format it for font, colour AND position:

.BA_Main_Left { border:4px inset #FFFF00; font-family: Verdana; font-size:
10pt; text-align: justify; position: absolute;
left: 34; top: 215; width: 352; z-index: 1;
margin-left: 0;
margin-right: 0; margin-top: 0; padding: 5px;
background-color: #FFFFCC }

Each occurrence of <p> (only there from the cut'n'paste) is seen as a new
paragraph (obviously) but the Style is then re-applied so the positioning is
reset.
 
C

Cimbian

Ron,

Is this easier than <br><br> in the HTML?



Ronx said:
Remove the positioning from the paragraph styles.
If you need to position the group of paragraphs, place them (un-positioned)
in a positioned layer:
<div id="paras">
<p>para 1</p>
<p>para 2</p>

<p>para n</p>
</div>

and in the CSS

#paras {position: absolute; left: 34; top: 215; width: 352; z-index: 1;}
#paras p {border:4px inset #FFFF00; font-family: Verdana; font-size:
10pt; text-align: justify;margin-left: 0;
margin-right: 0; margin-top: 0; padding: 5px;
background-color: #FFFFCC ;}
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/


Cimbian said:
I have unformatted text pasted onto the page. I then use a CSS style to
format it for font, colour AND position:

.BA_Main_Left { border:4px inset #FFFF00; font-family: Verdana; font-size:
10pt; text-align: justify; position: absolute;
left: 34; top: 215; width: 352; z-index: 1;
margin-left: 0;
margin-right: 0; margin-top: 0; padding: 5px;
background-color: #FFFFCC }

Each occurrence of <p> (only there from the cut'n'paste) is seen as a new
paragraph (obviously) but the Style is then re-applied so the positioning is
reset.
 
M

Murray

It's certainly more sensible. It allows the content within the <p> tags to
flow to fit the width, whereas explicit <br> tags do not.

--
Murray
============

Cimbian said:
Ron,

Is this easier than <br><br> in the HTML?



Ronx said:
Remove the positioning from the paragraph styles.
If you need to position the group of paragraphs, place them
(un-positioned)
in a positioned layer:
<div id="paras">
<p>para 1</p>
<p>para 2</p>

<p>para n</p>
</div>

and in the CSS

#paras {position: absolute; left: 34; top: 215; width: 352; z-index: 1;}
#paras p {border:4px inset #FFFF00; font-family: Verdana; font-size:
10pt; text-align: justify;margin-left: 0;
margin-right: 0; margin-top: 0; padding: 5px;
background-color: #FFFFCC ;}
 
C

Cimbian

What I have is a style that has top=left fixed, the right and bottom flow to
suit; text alignment is set to justify

Taking out all the paragraphs and replaceing with SHIFT-ENTER inserts
<br><br> and I get the desired result, it is just a pain to have to edit all
the text each time I cut and paste.



Murray said:
It's certainly more sensible. It allows the content within the <p> tags to
flow to fit the width, whereas explicit <br> tags do not.

--
Murray
============

Cimbian said:
Ron,

Is this easier than <br><br> in the HTML?
 
M

Murray

What you are describing is similar to hitting a fly with a sledgehammer.
It's completely unnecessary to position a paragraph to the location where it
would have gone anyhow. Furthermore, by making them absolutely positioned
you have guaranteed that your page will turn into an overlapping mess when
the text is resized in the browser. Remove those styles from the <p> tags
right this minute! 8)
 
C

Cimbian

Murray,

I'm sorry... I don't understand you.

The text would not automatically appear at that point on the page as the
positioning is absolute. Above it on the page are graphics, also pinned in
place top-left and a nav bar, not just more text.






Murray said:
What you are describing is similar to hitting a fly with a sledgehammer.
It's completely unnecessary to position a paragraph to the location where it
would have gone anyhow. Furthermore, by making them absolutely positioned
you have guaranteed that your page will turn into an overlapping mess when
the text is resized in the browser. Remove those styles from the <p> tags
right this minute! 8)

--
Murray
============

Cimbian said:
What I have is a style that has top=left fixed, the right and bottom flow
to
suit; text alignment is set to justify

Taking out all the paragraphs and replaceing with SHIFT-ENTER inserts
<br><br> and I get the desired result, it is just a pain to have to edit
all
the text each time I cut and paste.
 
M

Murray

Perhaps you could show me the page, then. Using absolute positioning on
text containers is flirting with danger.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top