I put a photo in the middle of a bulletted list and with CSS, made it float to the right. It comes out just where I want it on the page, but the W3C validation for XHTML didn't like it, saying "document type does not allow element "li" here".

I'm using XHTML 1.0 transitional. Does this mean I have to place it using CSS? I'd like to do it the way I did it but I'm guessing I'm out of luck, huh?

4 answers

0
points

The error is concerned with the li element.

did you wrap the li in a ul ?

show us the code and it will be easier to help you

Answered over 7 years ago by Tony Crockford
Nancy 0
0
points

Here's the code. Thanks for answering.

<ul>
<li class="bullet">Tour of a County Kerry village with picturesque thatched houses 
and buildings still in every day use.</li>
<li class="bullet">Tour of a 15th century castle that has been lovingly restored by 
one couple.</li>
<li class="bullet">A boat trip to Skellig Michael, a World Heritage Site off 
the Kerry coast that was once the home of very hardy monks.</li>
<li class="bullet">A visit to a modern day Buddhist retreat on a cliff overlooking 
the Atlantic ocean.</li>

<img class="right"
src="images/kenmarestreet.jpg" width="200" height="308" 
alt="street" />

<li class="bullet">Several walks to visit mythical standing stones that may 
predate the pyramids.</li>
<li class="bullet">A visit to a 12th century friary, where Celtic crosses 
still stand silent vigil.</li>
<li class="bullet">A day and night in the lively city of Cork, seat of 
"the rebel county."</li>
</ul>
Answered over 7 years ago by Nancy
0
points

You'll need to move the image inside the LI above it.

<li class="bullet"><img class="right" src="images/kenmarestreet.jpg" width="200" height="308" alt="street" />A visit to a modern day Buddhist retreat on a cliff overlooking the Atlantic ocean.</li>
Answered over 7 years ago by Artistic Abode
Nancy 0
0
points

Thanks for the input..... that kept the image in the place I want it, but the validator still doesn't "approve.". I'll keep trying.

Answered over 7 years ago by Nancy
  • This code snippet validates for me in XHTML and HTML5. What doctype are you validating against? Does the error still pertain to this list or is it giving another error now? Artistic Abode over 7 years ago