Web Design Forums

HTML and CSS Help

Having problems with these web design scripting? Ask here.

distance between two lines of text



Site of the Month Nominations
ENTER YOUR SITE NOW!

Reply
 
LinkBack Thread Tools
Old June 5 '09, 09:49 PM (#1)
ketanco is offline
WDF Regular
 
ketanco's Avatar
 
Join Date: October 2007
Posts: 228
ketanco is an unknown quantity at this point
distance between two lines of text

hello,
I have two
</br>
</br>
but i dont lke the spacing betwene two lines of text under each other. Th espace between two lines is too much. How can I reduce the space between two lines of text? I tried <p> but it is even worse, more space...I am trying to reduce spacing between two lines of text...more than one </br> but less than two </br>
such as:
line of text 1
line of text 2
so, how can I adjust the spacing between these two lines precisely as I like?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 6 '09, 12:48 AM (#2)
aeroweb99 is offline
<div id="learn"></div>
 
aeroweb99's Avatar
 
Join Date: February 2008
Location: Port Huron, Michigan
Posts: 986
aeroweb99 is just really niceaeroweb99 is just really niceaeroweb99 is just really niceaeroweb99 is just really niceaeroweb99 is just really nice
Use line-height in your css.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 6 '09, 11:03 AM (#3)
jyuill is offline
WDF Regular
 
jyuill's Avatar
 
Join Date: January 2009
Location: California
Posts: 145
jyuill will become famous soon enough
Send a message via AIM to jyuill Send a message via Yahoo to jyuill
Quote:
Originally Posted by ketanco
hello,
I have two
</br>
</br>
but i dont lke the spacing betwene two lines of text under each other. Th espace between two lines is too much. How can I reduce the space between two lines of text? I tried <p> but it is even worse, more space...I am trying to reduce spacing between two lines of text...more than one </br> but less than two </br>
such as:
line of text 1
line of text 2
so, how can I adjust the spacing between these two lines precisely as I like?
If the two lines are in fact paragraphs, then use the <p> tag. If the space is too much (and this is something most people probably do anyay), set the margin and padding to 0 in your css. Some do it in the body{} declaration, I use the *selector at the start of my CSS. That also helps your page start off appearing the same in all browsers, along with making it so you can position everything exactly how you want it.
Many people use massive resets; I have found the margin:0; padding:0; works just fine for me.
Then you will want to set your line-height to get just the space you want.

Last edited by jyuill; June 6 '09 at 11:04 AM. Reason: added more info.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 11 '09, 10:36 AM (#4)
Hitch - CP is offline
WDF Member
 
Hitch - CP's Avatar
 
Join Date: June 2009
Location: London
Posts: 84
Hitch - CP is on a distinguished road
Yes, altering the line-height in the css code should solver this problem.

I try to avoid using <p> because it disrupts the background of the container div.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 11 '09, 11:55 AM (#5)
Dorky is offline
Freelance
 
Dorky's Avatar
 
Join Date: June 2009
Location: Destin Florida
Posts: 905
Dorky will become famous soon enough
<p> is just fine lol.

p { margin: 0px; }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  Web Design Forums » Programming Help » HTML and CSS Help

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New line of text on same line, old lines move upward? slyder HTML and CSS Help 3 August 5 '07 02:21 PM
shortening a vertical border sanchopansa HTML and CSS Help 2 September 26 '06 09:15 AM
Can a single "table shell" (no TDs) be used without the disadvantages of tables? krystof HTML and CSS Help 18 September 6 '05 01:37 PM
Positioning Problems JR HTML and CSS Help 12 February 28 '04 03:10 PM

 
User Infomation
Your Avatar

Site Of The Month

Ticket Cake
Ticket Cake

Ticket Cake is a drupal based event ticketing platform. It features that ability to browse events and share them.

Nominate Your Site Now!

Advertisement
WolfCMS.org

Latest Articles
- by RickM
- by bfsog

Advertisement

Partner Links



All times are GMT -4. The time now is 02:40 AM.


WebDesignForums.net is Copyright © 2010 RikeMedia.

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163