Results 1 to 12 of 12

Thread: Simple HTML help

  1. #1
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts

    Simple HTML help

    How to i make the image map go at the very top of the page so it is inline with the background.

    Im guessing what i have done is the simplest way to do what i am trying to do?

    Heres the code:

    Code:
    <html>
    
    <head>
    <style>
      body
      {
        background-image: url("images/back_02.gif");
        background-repeat: repeat-x
      }
    </style>
    </head>
    
    <body>
    <!-- Top image map -->
    <img src="images/top.gif" align="top" width="800" height="133" border="0" alt="" usemap="#top_Map">
    <map name="top_Map">
    <area shape="rect" alt="" coords="253,110,316,131" href="index.htm">
    <area shape="rect" alt="" coords="179,109,250,129" href="index.htm">
    <area shape="rect" alt="" coords="103,109,178,132" href="services.htm">
    <area shape="rect" alt="" coords="48,109,103,130" href="systems.htm">
    <area shape="rect" alt="" coords="12,9,357,99" href="contact.htm">
    </map>
    <!-- Top image map end -->
    </html>
    (\__/)
    (='.'=)
    (")_(")

  2. #2
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    Positioned it absolutley:
    Code:
    <html>
    
    <head>
    
    <style>
      body
      {
        background-image: url("images/back_02.gif");
        background-repeat: repeat-x
      }
    </style>
    </head>
    
    <body>
    <!-- Top image map -->
    <img style="position: absolute; left: 0px; top: 0px; src="images/top.gif" align="top" width="800" height="133" border="0" alt="" usemap="#top_Map">
    <map name="top_Map">
    <area shape="rect" alt="" coords="253,110,316,131" href="index.htm">
    <area shape="rect" alt="" coords="179,109,250,129" href="index.htm">
    <area shape="rect" alt="" coords="103,109,178,132" href="services.htm">
    <area shape="rect" alt="" coords="48,109,103,130" href="systems.htm">
    <area shape="rect" alt="" coords="12,9,357,99" href="contact.htm">
    </map>
    <!-- Top image map end -->
    </html>

  3. #3
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    Ah brilliant, Thanks! (authough i had to move the img src infront of the style to get it to display for some reason)
    (\__/)
    (='.'=)
    (")_(")

  4. #4
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    Just a couple of criticisms on that particular snippet of code:

    1) Image maps are bad. They are inaccessible and inflexible. There are ways to do the same thing with ordinary images, or even just some styled text (my preferred method since it is more accessible e.g. allowing people to resize the page - unlike some images, it is pretty important that people can increase the size of the navigation, otherwise they won't be able to access anything!)

    2) If you've just added the blank alt text to make it validate, then it defeats the entire purpose of the alt text. The whole point of making you enter alt text is so that those that cannot or will not be viewing the images are at less of a disadvantage. Having a blank alt might be acceptable when you're using images as spacers (although I wouldn't recommend that either), but certainly not when you have images been using as navigation.

    I would recommend you try and get anything you write to validate, which means adding a doctype, changing the <html> tag appropriately, adding a closing body tag, and some other things I've probably forgotten but the validator will pick up for you.
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  5. #5
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    Yep the code for that is not finished, i need to add the alt value and that meta bussiness etc

    However what are my alternatives to an image map?
    (\__/)
    (='.'=)
    (")_(")

  6. #6
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    Quote Originally Posted by nvening View Post
    Yep the code for that is not finished, i need to add the alt value and that meta bussiness etc

    However what are my alternatives to an image map?
    Just separate images. If you really want to have them next to each other, you can just set the padding and margins to zero.
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  7. #7
    Member
    Join Date
    Sep 2006
    Posts
    86
    Thanks
    0
    Thanked
    0 times in 0 posts
    Just to expand on the previous post, you can float images/divs next to each other using CSS (i.e. float right), butting them right up to each other with 0 margins and padding.

    Whatever you do, please ensure that you utilise some sort of cross browser test to ensure that all users of popular browsers will see the same results (I use browsershots.org coz they are free or very cheap).

    Imagemaps aren;t all that bad, but they are best backed up with plain text links on the same page and which correspond to exactly what the links that the image maps are pointing to. They aren't all that SE friendly you see. See http://www.w3.org/TR/WAI-WEBCONTENT-...t-server-links





    .
    Last edited by TamDigital; 30-09-2006 at 10:48 PM.

  8. #8
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    Quote Originally Posted by TamDigital View Post
    Whatever you do, please ensure that you utilise some sort of cross browser test to ensure that all users of popular browsers will see the same results (I use browsershots.org coz they are free or very cheap).
    Good advice, but what's wrong with just using the different browsers? Internet Explorer, something with Gecko (e.g. Firefox) and Opera are the main browsers you need to try. Heck, you don't really even need to do that - if it works in Gecko, it'll probably work as you expect in other standards compliant browsers. It's just Internet Explorer that you also need to check.
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  9. #9
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    On previous sites i have made i have used individual images for the top navs but i thought i would go with an image map this time as it seemed the better way to go about it?

    I dont see whats wrong with them?
    (\__/)
    (='.'=)
    (")_(")

  10. #10
    Member
    Join Date
    Sep 2006
    Posts
    86
    Thanks
    0
    Thanked
    0 times in 0 posts
    Quote Originally Posted by mike_w View Post
    ... if it works in Gecko, it'll probably work as you expect in other standards compliant browsers...
    I appreciate your remarks and especially the use of the word probably.

    Production testing is a sound practice for any astute webmaster.

  11. #11
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    Quote Originally Posted by TamDigital View Post
    I appreciate your remarks and especially the use of the word probably.

    Production testing is a sound practice for any astute webmaster.
    especially as firefox isn't as compliant as all that. light years ahead of MSIE, sure, but still behind Opera or Safari/Konqeror

  12. #12
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    Quote Originally Posted by nvening View Post
    On previous sites i have made i have used individual images for the top navs but i thought i would go with an image map this time as it seemed the better way to go about it?

    I dont see whats wrong with them?
    set your browser font to something huge (hold ctrl, and scroll down a few times). how does your site behave?

    http://fredlwm.googlepages.com/lynx.zip - how does your site behave now?

    http://colorfilter.wickline.org/ - still fine?

    not everybody is guaranteed to view the website in exactly the way you see it on your screen. you need to do everything in your power to ensure a minimum of pain for those with issues (simple things like always setting valid Alt text, never using colors to signify things, etc)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. good html and php books????
    By gazzy in forum SHOPPING AND CLASSIFIEDS
    Replies: 6
    Last Post: 11-06-2006, 11:35 AM
  2. The HTML bit of PHP - simple!
    By Vini in forum Software
    Replies: 14
    Last Post: 26-09-2005, 09:26 AM
  3. simple html question
    By Jimmy Little in forum Software
    Replies: 9
    Last Post: 20-09-2004, 10:27 AM
  4. Replies: 10
    Last Post: 09-01-2004, 07:19 PM
  5. Replies: 1
    Last Post: 14-08-2003, 03:32 PM

Posting Permissions

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