Solved

is there a <p> height

Posted on 2011-03-01
5
274 Views
Last Modified: 2012-05-11
want to set all p to same height
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 35012599
no but there's line-height which may do want you want or setting margin-top or margin-bottom sometimes gives better results
0
 
LVL 7

Expert Comment

by:Reece Dodds
ID: 35012621
there is "line-height: **pt"

however, a P tag will automatically wrap text to boundary width so if you have one word too many, it will wrap to a new line, that will then make your paragraphs uneven heights.

To help combat this you may need to add "word-spacing:*pt" parameters in for each paragraph depending on their wrapping.

...
short of that, i'm all out of ideas
0
 
LVL 9

Expert Comment

by:rawinnlnx9
ID: 35012643
Your <p> height will be determined by the pitch and kern of the font. You can set:


.p
{
  margin-left: 10px;
  margin-right: 10px;
  margin-top: 30px;
  margin-bottom: 30px;
}

Open in new window


If your margins are all 10 px then change your .p to this:

.p
{
  margin: 10px;
}

Open in new window

0
 
LVL 9

Expert Comment

by:rawinnlnx9
ID: 35012658
I think there is even spacing you can apply. CSS is extremely powerful find this on the web shouldn't take you a monumental effort.
0
 

Author Closing Comment

by:rgb192
ID: 35031705
first answer of no
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question