Tagged: css, line break, padding
- This topic has 5 replies, 2 voices, and was last updated 10 years, 3 months ago by Sakin.
-
AuthorPosts
-
July 3, 2014 at 3:24 am #37744PHAUSParticipant
HI,
I’m having some trouble with a table I’ve created to organize some content. The page is here: http://naphc2014.phius.org/schedule/draft-breakout-sessions/
My problem is that I want the bolded names (ex: Sam Rashkin) on one line, and insert a line-break before the short non-bolded paragraph. Then another line break before the next set of bolded names, and again before the next paragraph.
No matter what I do, the line breaks disappear once I’ve published the page, but they appear in the preview.
Second, I’m wondering if you could advise which part of the CSS to tweak to give the table some padding. The text is uncomfortably close to the border.
Many thanks!
July 3, 2014 at 12:47 pm #37814SakinKeymaster@PHAUS: It’s the table and you need to manage your content. For every line break you can add in
<br />
code. See this tutorial http://www.w3schools.com/tags/tag_br.asp
Alternatively, you can add css to make all bold text in table in separate line by adding in the following css in “Appearance => Theme Options => Custom CSS” box..entry-content table strong { clear: both; display: block; }
July 3, 2014 at 8:45 pm #37860PHAUSParticipantHi Sakin,
Thanks! The CSS did help.
<br />
does nothing. Or rather it works when I hit preview, but if I switch from Text editor back to Visual the code disappears. Very frustrating.A little more research shows it to be an issue with WP editor.
Can you advise what CSS to use for adding padding? Best if it only affects this one table, instead of all tables on my site.
THANK YOU!
July 3, 2014 at 10:04 pm #37874SakinKeymaster@PHAUS: You can add
#post-556
for css just for this page.#post-556 .entry-content table strong { clear: both; display: block; }
Where do you want to add padding?
July 3, 2014 at 10:18 pm #37880PHAUSParticipantHi Sakin,
I need padding on the left of the text inside each cell. So it’s not hugging the left wall.
Thanks.
July 3, 2014 at 11:15 pm #37884 -
AuthorPosts
- The topic ‘Spacing/Line Breaks within a table’ is closed to new replies.