Forum Moderators: not2easy

Message Too Old, No Replies

CSS and the <p> tag

         

MrTorch

6:47 am on Jul 10, 2003 (gmt 0)

10+ Year Member



I am new to css and could do with a small bit of assistance.

How do you set the <p> tag to not take two lines. ie when you hit Enter in a WYSIWYG web page designer it drops you down an extra line. I would like it to act in the same way as a <br> tag and just go down to the next line.
Example
----------------
<p>Text here</p>
<p>Text here too</p>
-----------------
would appear like this
---------------
Text here

Text here too
---------------

I want it to appear like this
----------------
Text here
Text here too
----------------

Could someone please be so kind as to point me in the right direction on how to achieve this.

Thanks in advance
Jon

dmorison

7:01 am on Jul 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not tried it, but does:
p
{
margin: 0px;
}

work?

tedster

7:02 am on Jul 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<p style="margin-bottom:0;>Text here.</p>
<p style="margin-top:0;">Text here too.</p>

Hester

10:40 am on Jul 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or maybe you could make the paragraphs inline and use a break between them.

p {display:inline;}

Would be better for multiple paragraphs.

<p>First one</p>
<br /><p>Second one</p>

MrTorch

11:07 pm on Jul 10, 2003 (gmt 0)

10+ Year Member



Thanks for your help guys

I tried the first option that dmorison suggested and that seems to do the trick.

Thanks for all your help

Jon