is there a <p> height

Posted on 2011-03-01
Last Modified: 2012-05-11
want to set all p to same height
Question by:rgb192
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
LVL 29

Accepted Solution

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

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

Expert Comment

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

  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:

  margin: 10px;

Open in new window


Expert Comment

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.

Author Closing Comment

ID: 35031705
first answer of no

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

749 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