Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

<p> and <br> line spacing

Posted on 2007-11-14
8
Medium Priority
?
1,112 Views
Last Modified: 2011-08-18
Hi

With css how do I change the default line spacing for the <p> and <br> tags

Many thanks
0
Comment
Question by:kenabbott
[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
  • 4
  • 2
  • 2
8 Comments
 
LVL 18

Accepted Solution

by:
Eternal_Student earned 2000 total points
ID: 20281008
p{line-height:14px}
0
 
LVL 18

Expert Comment

by:Eternal_Student
ID: 20281021
or

br {line-height:8px}
0
 

Author Comment

by:kenabbott
ID: 20281165
So what are the default settings for the 2 tags?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 18

Expert Comment

by:Eternal_Student
ID: 20281295
Im not sure about that [good question] but I do know that IE and FF can set them differently, more so the br tag because it also depends on the font-size, family, etc.
0
 
LVL 6

Expert Comment

by:TheKyle
ID: 20283594
"So what are the default settings for the 2 tags?"

All browsers have different default settings for each element.
0
 

Author Comment

by:kenabbott
ID: 20287641
Yes I appreciate the differnces with different browsers, I was just curious what the the defaults were for IE and FF for examples
0
 
LVL 18

Expert Comment

by:Eternal_Student
ID: 20287923
The line-height property will accept a value to control the spacing between baselines of text. ... Percentage values are relative to the element's font size.

With that said i don't think paragraph line-height will be different between IE and FF if it is not set. But the <br/> tag certainly is a different height just like inconsistencies between margins on form elements. So playing with the line-height value is one way of causing both browsers to behave the same way.

This is usually the very first line I use on my stylesheet:

*{margin:0; padding:0}

That ^ will select everything and set its' default margin and padding to zero so both browsers are equal. The only other inconsistencies I run into are usually genuine bugs or line-height issues to with padding/margin calculations [especially on complex menus or form buttons].
0
 
LVL 6

Expert Comment

by:TheKyle
ID: 20289512
You'd probably have to ask someone that works for Microsoft or Mozilla to find out what the default is.  Of course, you could download the Mozilla source code and find out what Firefox's default is on your own, but I don't think you want to do that. ;)

It's possible that IE and FF use the same default line-height, but not guaranteed.  Unfortunately I don't know what they are.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

722 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