Quick Search
Sunbelthost Hosting - Colocation and Dedicated Servers

Threads: 21,763
Posts: 83,205
Members: 24,315
Newest member: joemccue

Web Hosting


 
  #1  
Old 13 Nov 2009, 07:40 AM
Legolax Legolax is offline
New Member: Posts Will Be Moderated
 
Join Date: Nov 2009
Posts: 1
(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
Reply With Quote
  #2  
Old 13 Nov 2009, 01:30 PM
Wickham's Avatar
Wickham Wickham is offline
Established Member
 
Join Date: Feb 2006
Location: Salisbury UK
Posts: 3,865
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.
WIN XP SP3; IE7, Firefox 3.5, Opera and Safari for Windows; screen resolution usually 1024x768.
IE6 on W98 with 800*600. IE8 RTM on Vista 1440*900.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What are HTML tags? gilbertsavier Tutorials 1 09 Sep 2009 10:25 AM
Introduction to HTML dotcomguy Tutorials 16 12 Mar 2009 10:32 PM
Help creating anchor tags to blog entry boo2hed Web Design, HTML Reference and CSS 1 08 Oct 2008 03:49 AM
automatically creating new html pages with content uploaded by users radguy88 Client & Server Side Scripting (PHP, ASP, JavaScript) 1 03 May 2008 09:02 AM
From HTML to XHTML binarytrends Tutorials 4 29 Jul 2007 04:39 PM


All times are GMT -5. The time now is 01:24 PM.


 

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Forums Copyright © 2004-2010, WebDevForums.com. Web design by Miami Web Design. All Rights Reserved.