質問

A picture of a piece of pie is suppose to display, but it won't. The code for the picture is what the individual used in a video tutorial, I only changed the name of the picture. I have asked my teachers and the only response I received was the size of my picture might be the issue. The images were not exceed a size of 48 x 48 pixels and they do not. The code I have listed is just one entry. I would appreciate any help you might give me. THank you, Tisha

<?xml version="1.0"?>



<?xml-stylesheet type="text/css" href="pies6.css"?>
<pies>
<pie>
    <indo>PP12</indo>
    <name>Perfect Pecan</name>
    <factory>Baker</factory>
    <price>$8.30</price>
    <B-S>T</B-S>
    <html:IMG xmlns:html='http://www.w3c.org/TR/REC-html40/' SRC='images/pecan.gif' />
    </pie>
</pies>

The css code is:

pies
{
background-color:#e0f8f7;
width:100%;
}

pie
{
display:block;
margin-bottom:60pt;
}

name
{
display:block;
color:#0b2161;
margin-left:15pt;
font-size:25pt}
役に立ちましたか?

解決

This works in FireFox 27 (linux), Chrome 33 (linux), and IE9 (win7).

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="pies6.css"?>
<pies>
  <pie>
    <indo>PP12</indo>
    <name>Perfect Pecan</name>
    <factory>Baker</factory>
    <price>$8.30</price>
    <B-S>T</B-S>
    <html xmlns="http://www.w3.org/1999/xhtml">
      <img src="images/pecan.gif" />                                                  
    </html>
  </pie>
</pies>

他のヒント

Do I am too tired or I don't see any img src in the code? Let's say the picture is in the correct folder, you declare the path to see that picture, but you don't mention in the code that you want to display it somewhere.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top