Help - Search - Members - Calendar
Full Version: need help with xhtml
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
jjth39347
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>LMCC Dorms</title>
</head>

<body style="background-color: #fdebcf; font-family: sans-serif">
Well I have the image map code on a main page that links to 4 other pages. The code is correct but the image isn't showing up with the 4 hyperlink dividers.


<!-- 4K dorm name here -->

<h1 style="text-align: center">Lake Michigan City College Dorms</h1>
<br />
<br />
<p style="font-size: 14pt">
All of the dorm rooms at LMCC have the same basic layout. Click on an area of the room for a description of the size and amenities.
</p>
<br />
<img src="images/dormroom.gif" alt="dorm room" style="float: right; border: 5px dashed red" usemap="#dorm" />
<map name="dorm" id="dorm">
<area shape="rect" coords="87,117,239,188" href="closet.htm" alt="closet" />
<area shape="rect" coords="373,124,498,170" href="restroom.htm" alt="restroom" />
<area shape="rect" coords="86,295,252,345" href="sleeparea.htm" alt="sleeparea" />
<area shape="rect" coords="78,412,216,453" href="studyarea.htm" alt="studyarea" />
</map>

</body>

</html>
Barons
Not sure what you mean by the 4 hyperlink dividers. Are the different pages? Or located on a different level of your site?

Not sure if it could be an issue with your file path to the image.

images/dormroom.gif

You might try the direct link to your image.

www.yoursite.com/images/dormroom.gif or what ever.


jjth39347
yea, each link goes to a different page. and after taking so advil I think the problem was with the usemap tag,

should it be <img src="images/dormroom.gif" alt="dorm room" style="float: right; border: 5px dashed red" usemap="#images/dormroom.gif" />
jjth39347
pretty much the image just isn't showing up
Darin McGrew
Please see the FAQ entry Why are my images coming out all wrong or not loading?

If that doesn't help, then please post the URL (address) of a page that demonstrates the problem so we can see it for ourselves.
jjth39347
okay I've fixed all the dumb errors I have made but the image still isn't coming up. I can't post the url as this is for a class lab, and yes we are allowed to seek out side help if we hit a road block.


<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>LMCC Dorms</title>
</head>

<body style="background-color: #fdebcf; font-family: sans-serif">

<!-- 4K dorm name here -->

<h1 style="text-align: center">Lake Michigan City College Dorms</h1>
<br />
<br />
<p style="font-size: 14pt">
All of the dorm rooms at LMCC have the same basic layout. Click on an area of the room for a description of the size and amenities.
</p>
<br />
<img src="images/dormroom.jpeg" alt="dorm room" style="float: right; border: 5px dashed red" usemap="#m_images/dormroom.jpeg" />

<map name="dorm" id="dorm">
<area shape="rect" coords="87,117,239,188" href="closet.htm" alt="closet" />
<area shape="rect" coords="373,124,498,170" href="restroom.htm" alt="restroom" />
<area shape="rect" coords="86,295,252,345" href="sleeparea.htm" alt="sleep area" />
<area shape="rect" coords="78,412,216,453" href="studyarea.htm" alt="study area" />
</map>

</body>

</html>
Barons
I just posted your site onto my host and used one of my images and it worked fine.

Are you sure the path to your image is right?

www.wararmada.com/tdb/test.php

The only thing i changed was my image.

<img src="assets/images/bgspider.png" alt="dorm room" style="float: right; border: 5px dashed red" usemap="#m_images/dormroom.jpeg" />

try using the full address of your image.

mine would be

http://www.wararmada.com/tdb/assets/images/bgspider.png

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.