Creating Line Breaks Inside a Nested List |
Creating Line Breaks Inside a Nested List |
nootkan |
Jul 16 2021, 01:52 PM
Post
#1
|
Member Group: Members Posts: 34 Joined: 16-July 21 Member No.: 28,016 |
Hello all, this is my first post.
I have medium experience with html/css and can usually solve a lot of my issues with a little time and google. This one has me stumped. I am trying to create a nested list of ol and ul with line breaks between the paragraphs inside the li tags that will validate. The site I am working on isn't live but local so I cannot provide a link. I can however provide an image of what it looks like now. This is what I have now and is the look I want for the page but won't validate because of the paragraph tag inside the li tag: CODE <ol><li>How do you plan to fish this weed-bed?<ul><li><p>Long-Range and Very Slowly!</p></li><p>Why? Clear-water is why! It's not dark anymore. The fish can see you, even before you can see them. Even through your $100 polarized sunglasses.</p><li><p>Begin fishing this weed-bed in layers! Take it apart, area by area!</p></li><li><p>ALWAYS begin your retrieve BEFORE the lure touches the water!(fewer hang-ups, immediate hook-sets and less splash on lure-entry)</p></li><li><p>Any time that you fish a clear-water area or weed-bed, make long-distance casts or PITCH your spinnerbait to your target.</p></li><li><p>Accuracy is extremely important when 'pitching' a spinnerbait or any other type of lure.</p></li><p>So, if you are not accurate enough right now to hit within an inch or two from what you cast to, spend a few hours a week for the next couple of weeks standing on the back porch steps pitching to a coffee can.</p><p>It'll be well worth your time!</p></ul><li>What do you do right now?<ul><li><p>Approach a weed-bed only under electric power.</p></li><li><p>Never approach a weed-bed that you intend to fish any closer than 100 feet with the gas-motor running!</p></li><li><p>Begin your approach to the weed-bed by stopping-dead about twenty-five to 50 feet from the nearest obvious corner of the area.</p></li></ul></li><li>Lure choice?<ul><li><p><span class="articleColor">LURE:</span>Spinnerbait.</p><p>Why? Because it's the perfect lure to attack the entire targeted area!</p></li><li><p><span class="articleColor">COLOR:</span> white/silver glitter, or pearl white/minnow-flash glitter or chartreuse/silver-glitter or silver/silver-glitter.</p><p> Why? Because the lighter/brighter colors are easier for both the Bass & for you to see.</p><p>Especially at the longer distances that you'll have to remain at to properly fish this area.</p></li><li><p><span class="articleColor">BLADE(s):</span>Single blade; hammered-Nickel, Deep-cupped Colorado.</p><p>Why? Lots of flash in the crystal-clear water. Lots of vibration. The deep-cupped blades will begin rotating as soon as they hit the water.</p><p>That means that the flash & vibration begins immediately!</p></li><li><p><span class="articleColor">WIRE:</span> medium weight wire, NOT HEAVY WIRE and with a short or standard arm length.</p><p>Why? Make the lure work for you! Let the lighter wire transmit the vibration of the blades. The shorter arms allow fewer hang-ups in the weeds.</p></li></ul></ol> I've tried changing the p tags to divs and styling the divs with padding but that didn't achieve the same look. Also tried using just span tags and they didn't work either. Nothing I try seems to validate. Any advice or solutions greatly appreciated. This post has been edited by nootkan: Jul 16 2021, 01:58 PM |
Christian J |
Jul 16 2021, 02:22 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
Hello!
The UL and OL elements can only contain LI as their direct child elements. But you can use P elements inside those LI elements. |
nootkan |
Jul 16 2021, 02:46 PM
Post
#3
|
Member Group: Members Posts: 34 Joined: 16-July 21 Member No.: 28,016 |
Hi Christian J, thanks for your reply.
After reading your post I went back and looked over my code because I thought that I had followed that rule when creating the list. However, what I didn't realize was that there were a few closing li tags where they shouldn't have been. Once I removed them, voila it validates! Appreciate your support! Also I see no way to mark this post as solved. I tried to edit my original subject but cannot. This post has been edited by nootkan: Jul 16 2021, 02:49 PM |
Christian J |
Jul 16 2021, 03:12 PM
Post
#4
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
|
Lo-Fi Version | Time is now: 28th March 2024 - 11:45 PM |