- This topic has 6 replies, 4 voices, and was last updated 3 years, 3 months ago by
johnzoro.
-
AuthorPosts
-
September 28, 2018 at 6:32 pm #689043
Enamul
http://nichepie.com/wp-content/uploads/2016/08/pros-and-cons.jpg
Hi,
I was trying to create a Pros and Cons into same row on my blog similar to Nichepie. How I do that?GeneratePress 2.1.4September 29, 2018 at 4:21 am #689237David
StaffCustomer SupportHi there,
nichpie are just adding an image. You could create a table but they are can be problematic with resposniveness. Or you could create a couple of lists and wrap them in some columns – like this:
HTML Markup:
<div class="comparison-table"> <div class="comparison-column pro"> <h4>Pros</h4> <ul> <li>Pro 1</li> <li>Pro 1</li> <li>Pro 1</li> <li>Pro 1</li> </ul> </div> <div class="comparison-column con"> <h4>Cons</h4> <ul> <li>Con 1</li> <li>Con 1</li> <li>Con 1</li> <li>Con 1</li> </ul> </div> </div>
CSS
.comparison-table { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; padding: 2%; -webkit-box-sizing: border-box; box-sizing: border-box; border: 1px solid black; } .comparison-column { -webkit-box-flex: 1; -ms-flex: 1 0 240px; flex: 1 0 240px; } .comparison-column.pro h4 { background-color: green; } .comparison-column.con h4 { background-color: red; } .comparison-column h4 { color: #fff; padding: 2%; -webkit-box-sizing: border-box; box-sizing: border-box; } .comparison-column ul { margin-left: 1em; } .comparison-column li { list-style-type: none; font-size: 0.8em; } .comparison-column.pro li:before { content: '\f00c'; color: green; margin-right: 10px; } .comparison-column.con li:before { content: '\f00d'; color: green; margin-right: 10px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 29, 2018 at 10:25 pm #713860Kemo
Your customer support is amazing. I’m using this on our site. thanks, David.
October 30, 2018 at 11:28 am #714688David
StaffCustomer SupportGlad you found it to be of help
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 28, 2019 at 5:04 am #794291johnzoro
when i use this it makes boxes where the bullet points would normally be. any idea why this is the case?
January 28, 2019 at 5:12 am #794295David
StaffCustomer SupportHi there,
that code relies on fontawesome icons being loaded on the site. If you want us to look deeper can you raise a new topic, where you can share you URL. Please add a link to this topic for reference.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 30, 2019 at 6:10 pm #797194johnzoro
i’ve started a new topic on https://generatepress.com/forums/topic/pros-and-cons/
-
AuthorPosts
- You must be logged in to reply to this topic.