Results 1 to 2 of 2

Thread: (help) Webstandard - creating new html tags

  1. #1
    Legolax Guest

    (help) Webstandard - creating new html tags

    Hello eveyone!

    i'am having a problem while creating a new html element,

    i want to create this tag: <fmProd> - this going to be a tag that will load an img from the database as an background img with links.

    code example:

    <fmProd style="background-image:url(Img/fotoEmpresa.jpg); cursorointer" onClick="location.href='index.asp'"></fmProd>

    and the CSS tag declarition:

    fmProd { width:329px; height:102px; background-color:#CCCCCC; margin-top:2px; float:left; background-position:center; }

    well, it works fine for Firefox and Chrome, but i got a problem in IE, the browser cant read the new tag, and it dont show the image.

    some one know why the IE cant render this new tag??
    its my first time creating a new element.

    and sorry for the bad english =x

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    You can't invent a new element but you can create an id or class:-
    HTML markup:-

    <div id="fmProd" style="background-image:url(Img/fotoEmpresa.jpg); cursor: pointer;" onClick="location.href='index.asp'"></div>

    CSS

    #fmProd { width:329px; height:102px; background-color:#CCCCCC; margin-top:2px; float:left; background-position:center; }

    You could then put the background-image and cursor styles inside the CSS style instead of inside the markup.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. What are HTML tags?
    By gilbertsavier in forum Tutorials
    Replies: 1
    Last Post: 09 Sep 2009, 10:25 AM
  2. Help creating anchor tags to blog entry
    By boo2hed in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 08 Oct 2008, 03:49 AM
  3. automatically creating new html pages with content uploaded by users
    By radguy88 in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 03 May 2008, 10:02 AM

Posting Permissions

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