1

When I use <p> I get to large of a space but when I use <br\> I don't get large enough of a space.

alt text

I want a large space between "Glucose Levels" and "I have recently been diagnosed..."

Marcel Korpel
  • 21,285
  • 5
  • 59
  • 80
Spencer
  • 19,732
  • 34
  • 83
  • 119

7 Answers7

2

It's been answered here: How to change the height of a <br>?

Community
  • 1
  • 1
Michael
  • 1,746
  • 7
  • 19
  • 35
2

Using proper mark-up, ideally semantic mark-up, for your content aids you greatly in styling that content:

<h1>What vitamins amd supplements help control glucose levels?</h1>
<p>I am a recently diagnosed type-II diabetic. Lately, my glucose levels have been very high.</p>

With the css:

h1 {
    font-size: 1.2em;
    margin: 0; /* removes any default margin placed on the h1 element */
}
h1 + p { /* selects only those p elements immediately following a h1 */
    margin: 1em 0 0 0; /* short hand for margin-top margin-right margin-bottom margin-left */
}

Results in this JS Fiddle demo.

David Thomas
  • 240,457
  • 50
  • 366
  • 401
1

You can simple use the paragraph (P) and assign a css class to it. With that css class you can set the top and or bottom margins.

abc

simple as 1, 2, 3

.intro { margin-bottom: 10px; }

Yvo
  • 17,869
  • 11
  • 68
  • 88
0

Try using Heading <h1>, <h2>, <h3> elements instead of Paragraph elements.

Also, use Cascading Style Sheets (CSS) for an extreme level of control over your presentation. In this case you could use the margin-bottom attribute to control your spacing. Check w3schools for good CSS tutorials or just use Google.

walkingTarget
  • 398
  • 4
  • 17
0

Try line-height in your css.

or alternative try to set a margin-top, margin-bottom on your br element.

Michele
  • 6,106
  • 2
  • 39
  • 44
0

You should place the first text ("What...levels?") in a div, give it an id and than change the css property "margin-bottom:Xpx;" where X is the height of the space between two textes.

Mironor
  • 1,137
  • 9
  • 24
0

You have a couple different options...

  1. Adjust the margin and/or padding for the class on on your <p> elements
  2. Insert a div with width="100%" and height equal to the space you want between the elements
Xenethyl
  • 3,141
  • 20
  • 31