Previous Thread
Next Thread
Print Thread
Hop To
Joined: Dec 2006
Posts: 1,235
veteran
veteran
Joined: Dec 2006
Posts: 1,235
Is there any way to put line breaks in lists?

Alternatively, where in the styles can I "pad out" the text in the post area so it doesn't look so compact?

Joined: Dec 2006
Posts: 1,235
veteran
veteran
Joined: Dec 2006
Posts: 1,235
I'm still looking for some help with this if anyone can advise.

I would like the display of my list items to change from this:
  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5
to this:
  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5
by adding line breaks between list items.

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
go to your Cpanel extra css happy place..

and you can add li { line-height: 2em; }

where the 2em; is the spacing..

you could use pt or px.. whatever.. fiddle with it to your liking wink

now you can further narrow it down to just lists in posts..

by doing

Code
.post-content li {
 line-height: 2em;
}

which will only affect lists in posts wink

keep in mind this affects ALL lists in posts..

Joined: Dec 2006
Posts: 1,235
veteran
veteran
Joined: Dec 2006
Posts: 1,235
I've tried that but it doesn't just put line breaks between list items, it splits lines in the text too so it doesn't look right.

------------------------------------------------------------------------
Before example:

  • I've tried that but it doesn't just put line breaks between list items, it splits lines in the text too so it doesn't look right.
  • I've tried that but it doesn't just put line breaks between list items, it splits lines in the text too so it doesn't look right.

after:

  • I've tried that but it doesn't just put line breaks between list items,

    it splits lines in the text too so it doesn't look right.
  • I've tried that but it doesn't just put line breaks between list items,

    it splits lines in the text too so it doesn't look right.

What I'm after:

  • I've tried that but it doesn't just put line breaks between list items, it splits lines in the text too so it doesn't look right.
  • I've tried that but it doesn't just put line breaks between list items, it splits lines in the text too so it doesn't look right.

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
ah yes, good catch. well then don't use line-height and instead style it to add oh say bottom padding.

ie: padding: 0 0 10px 0;

that would pad the bottom. you could also do margins, but keep in mind that IE's box model and most standards browsers treat it a little differently.

just experimenting should get you what you want though wink

Joined: Dec 2006
Posts: 1,235
veteran
veteran
Joined: Dec 2006
Posts: 1,235
Absolutely perfect! Looks the same in both IE7 and Firefox.

Thank you very much for that. Much appreciated. wink

Joined: Nov 2006
Posts: 3,097
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,097
Likes: 1
When and where possible using an "em" would be best for all browsers (though you can't use "em" everywhere, and I've not looked at this that close)

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
i like using em vs pt and px... others don't. matter of fact, i believe that's the first point at which i kinda burst on to the ubbthreads scene.. Mark S and i went back/forth on it..

*sigh* seems like just yesterday laugh

it's a personal choice for me and i have a lot of reasons.

there are pros and cons on the web with css geeks going back/forth on it, so i leave you to your personal taste wink

Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
I like PX :ducks:


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
0 members (), 115 guests, and 138 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)