Advanced Search

Results 1 to 10 of 10

Thread: Help coding XHTML image map

  1. #1
    Join Date
    Oct 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help coding XHTML image map

    I've just started teaching myself some xhtml and am getting hosted so I thought for my new site I would use it.

    I know how to make image maps but when I sent the file to my boyfriend he tried it on both FF and IE and said in both it didn't show. Probably because I only used the regular HTML way to do it, right?

    HTML Code:
    <img src="http://i90.photobucket.com/albums/k265/rhianoran/alilbit/head
    er.gif" border=0 usemap="#mymap">
    
    <map name="mymap">
    <area shape=rect coords="44,16,112,84" 
    href="">
    
    <area shape=rect coords="78,157,140,224" 
    href="">
    
    <area shape=rect coords="281,125,344,191" 
    href="">
    
    </map>
    Regular map, no links yet of course. Now I did look at W3 and read something about id or whatever...W3 is confusing...
    So please help, I'm kind of hoping to get this done by the end of the weekend.

    Thanks in advanced!
    -Rhian

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Why are you using XHTML?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rhianoran
    I've just started teaching myself some xhtml and am getting hosted so I thought for my new site I would use it.
    There is only an advantage in using XHTML if it will be processed as an application of XML. That is, using an XML processor. MSIE doesn't support XHTML in this fashion, so serving XHTML to clients is pointless. Stick to HTML 4.01, preferably the Strict document type.

    XHTML can be useful server-side, but output should be transformed into HTML before returning a response to the client.


    There isn't much to learn with regard to XHTML. There are relatively few differences between HTML and XHTML 1.x. The most important thing is to have a thorough understanding of XML.

    Mike

  4. #4
    Join Date
    Oct 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well I'm using it mostly it seems because I'm a dork...lol

    But like..dorky question - If I don't use XHTML is using stuff like <br /> gonna work the same way? Cuz <br> doesn't like make as big as a gap as the <br />...lol...

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    That is purely a style decision. You can alter the <br> element with CSS just like any other element.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Oct 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK I've made it so I'm not using XHTML anymore thanks everyone...but now I'm having more problems with Firefox since I downloaded it and looked for myself - the main div is smaller than in IE and I don't know how to fix it. I guess I should probably make a new thread for this problem but if someone would quickly help me out here, this is my stylesheet right now:

    HTML Code:
    <style type="text/css">
    body
    {background-color: #00688B;
     font-family: arial;
     font-size: 12px;
     font-color: ;
     margin: 0px;
     padding: 0px;
    }
    
    a:link, a:active, a:visited
    {color: #00B2EE; text-decoration: none; font-weight: bold;}
    
    a:hover
    {color:; border-top: 2px dotted; border-bottom: 2px dotted;}
    
    
    #header
    {float: left;
     padding: 5px 5px 10px 5px;
     margin: 0px 10px 10px 30px;
     background-color: transparent;
     height: 230px;
     width: 650px;
    }
    
    #content
    {float: left;
     padding: 5px 5px 10px 5px;
     margin: 0px 30px 10px 30px;
     background-color: #00BFFF;
     border-left: 1px solid;
     border-right: 1px solid;
     border-top: 1px solid;
     border-bottom: 1px solid;
     width: 650px;
    }
    
    html>body #content 
    {width: 650px;}
    
    #navigation
    {float: left;
     padding: 10px;
     margin: 0px 0px 0px 10px;
     background: transparent;
     border: 0px solid;
     width: 150px;
    }
    
    html>body #content 
    {width: 120px;}
    
    .head
    {font-famlily: arial;
     font-size: 16px;
     font-weight: bold;
     color: #000000;
     border: 1px solid; 
     background-color: #009ACD;
     padding: 2px;
     margin: 0px;}
    </style>

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What's probably happening is the famous IE expanding-elements bug: instead of respecting the element's dimensions, IE will expand the element to fit its content. You shouldn't be using absolute units anyway, though.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Oct 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks again ^^ I got it fixed! *glee*

  9. #9
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rhianoran
    If I don't use XHTML is using stuff like <br /> gonna work the same way? Cuz <br> doesn't like make as big as a gap as the <br />
    The br element isn't meant to make a gap. It's sole purpose is to interrupt a single line of in-line content; to force content that follows on to a separate line. Two or more consecutive br elements is almost a sure sign of improper use, and a new block level element should be introduced, instead. Similarly, using a br element to separate block level elements is incorrect, and should be replaced by margins or padding on one or both of the elements.

    Mike

  10. #10
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    260
    Thanked 690 Times in 678 Posts

    Default

    The original problem may have been not having self closing tags... like:

    <area .... /> or <img ... />

    But... as has been said, no point in xml anyway.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •