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,536
  • 6
  • 60
  • 80
Spencer
  • 21,348
  • 34
  • 85
  • 121

7 Answers7

2

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

Community
  • 1
  • 1
Michael
  • 1,816
  • 7
  • 21
  • 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
  • 249,100
  • 51
  • 377
  • 410
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
  • 18,681
  • 11
  • 71
  • 90
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
  • 408
  • 5
  • 17
0

Try line-height in your css.

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

Michele
  • 6,126
  • 2
  • 41
  • 45
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,157
  • 10
  • 25
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,179
  • 21
  • 31