ArtcoInc Posted August 13, 2019 Share Posted August 13, 2019 On my Category page(s), I include a lot of information. Text, pictures, links, etc. Several things I have noticed: 1) The Category Description is HTML text. But, there are limits to what HTML code one can include. I *used* to be able to use a <br/> to add a line feed, but it doesn't work now in Phoenix. Does anyone know how to add a line feed in Phoenix? I have the Category Images add-on installed, which shows the Categories as small boxes on the home (index.php) page. While I was able to get some page formatting (ie: line breaks) of the Category Description by wrapping blocks of text in <div></div>'s and using <div class="clearfix">, it completely messed up the home page! So, this is not an option. 2) To display an image in the Category Description, I must include the actual image dimensions (width="xxx" height="xxx") (or some multiple of the actual image dimensions), otherwise the image is scaled to fit (ie: it is stretched to fill the width). Also, I must include class="img-fluid" in order for the image to be responsive (in BS3, it used to be class="img-responsive"). 3) While it should be no surprise, one can not include PHP code in the Category Description. TIA Malcolm Link to comment Share on other sites More sharing options...
Heatherbell Posted August 13, 2019 Share Posted August 13, 2019 @ArtcoInc For Category Description instead of <br/>, we wrapped each line in a div which seems to work - yes, the whole img-fluid is weird - we limited upper size with user.css .img-fluid {max-width: 200px; max-height: 200px;} which seems to work - cornishhoney.co.uk Link to comment Share on other sites More sharing options...
ArtcoInc Posted August 13, 2019 Author Share Posted August 13, 2019 @Heatherbell I will try again with the <div></divs>'s ... this time without the "clearfix", to see if it still breaks the home page. Thanks! M Link to comment Share on other sites More sharing options...
Heatherbell Posted August 13, 2019 Share Posted August 13, 2019 @ArtcoInc My fix was for Category Description on category page - don't know about home/index page although we also use Jackmc's Category Images but with modification Link to comment Share on other sites More sharing options...
♥JcMagpie Posted August 13, 2019 Share Posted August 13, 2019 44 minutes ago, ArtcoInc said: 1) The Category Description is HTML text. But, there are limits to what HTML code one can include. I *used* to be able to use a <br/> to add a line feed, but it doesn't work now in Phoenix. Does anyone know how to add a line feed in Phoenix? Not sure I fully understand your problem but just added 3 <br/> to the first cat and worked fine, giving 3 lines. discription works fine as well Link to comment Share on other sites More sharing options...
burt Posted August 13, 2019 Share Posted August 13, 2019 44 minutes ago, ArtcoInc said: 1) The Category Description is HTML text. But, there are limits to what HTML code one can include. I *used* to be able to use a <br/> to add a line feed, but it doesn't work now in Phoenix. Does anyone know how to add a line feed in Phoenix? Assuming talking about this: HTML (any, there is no limit)...works well. That display is: <p>Fruit contains <b>many</b> nutrients and vitamins essential to health. Eating fruit is an essential part of a healthy balanced diet.</p> <dl class="row"> <dt class="col-sm-3">Description lists</dt> <dd class="col-sm-9">A description list is perfect for defining terms.</dd> <dt class="col-sm-3">Euismod</dt> <dd class="col-sm-9"> <p>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</p> <p>Donec id elit non mi porta gravida at eget metus.</p> </dd> </dl> <div class="w-100"></div> <img src="images/store_logo.png" class="img-thumbnail" width="300"><br><br> Link to comment Share on other sites More sharing options...
ArtcoInc Posted August 13, 2019 Author Share Posted August 13, 2019 @burt I had forgotten about <p> ... It worked ... <face-palm> Thank you ... M Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.