HTML - Png Button Question
The button in the upper right of this page http://www.hindbrain.net/ex10.php uses an image, home2.png, which is 90x90 and has a transparent background. Yet it displays as shown (I'm using firefox). The background is white, and it doesn't fit. How do you get it to display correctly (centered and transparent background)?
Edit: I got it to center by setting the border to 0px. The transparency is still not working. thanks, William Similar TutorialsHey guys. Is it possible to assign a value to a radio button such as a large section of text which I have an id to. So for instance my text is <font id="someText">Words</font> I want my radio button value to correspond with that. Anyone have any ideas? -Tim I have created a menu on a webpage, and added a rollover effect to it. It's working great. But here's what I would like to do now. When you click on one of the buttons in the menu, and it takes you to that page, I want the button you clicked to stay lit up like it appears in the MouseOver effect. And then restore itself when you click on another menu button. I've seen this used on a lot of sites, so is there a simple way for me to do this? Or is this only possible in something like CSS? Here is my code: Code: <!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" dir="ltr" lang="en"> <head> <title>Prospective Student Database</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> </head> <body> <form action="insert.php" method="post"> <input type="radio" name="gender" value="1">Male </form> </body> </html> I am trying to follow the W3C standard, which I put in the W3C HTML validator. It keeps giving me a error of the radio button should end with '/>' instead of '>'. Like this: Code: <input type="radio" name="gender" value="1"/>Male But I checked the W3C recommendation. Even their recommendation on the radio button doesn't end with '/>' The recommendation is he http://www.w3.org/TR/html4/interact/forms.html The first example already showed. What is the problem? Thanks. Hello, First off let me say thanks for checking this posting out. I am sort of stumped on this one however. My question is I have an inline frame that is holding data from a txt file. What I would like to do is take the data the inline frame is displaying and copy it to the clipboard using a button. Below are links to the images and the code I am using... Bascially you see the copy button, I want to click that and it copy the text thats in the inline frame to the clipboard so I can paste it elsewhere, like in word (just an example) Code: <html> <head> <title>SCWC Responces</title> <style> body { margin: 20px; background: #eee; } iframe { width: 700px; height: 300px; border: 1px solid #ccc; background: #fff; } </style> <script language="JavaScript"> <!-- function FP_swapImg() {//v1.0 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length; n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm; elm.$src=elm.src; elm.src=args[n+1]; } } } function FP_preloadImgs() {//v1.0 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array(); for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; } } function FP_getObjectByID(id,o) {//v1.0 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id); else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el; if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c) for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; } f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements; for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } } return null; } // --> </script> </head> <body onload="FP_preloadImgs(/*url*/'button13.jpg',/*url*/'button14.jpg')"> <p align="left">Please Choose The Appropriate Response :</p> <ul> <li><a target="show_file" href="SCWC_NO_SUPPID.txt">No 5-Digit Supplier Code</a></li> <li><a href="NO_INVALID_SPONSOR.txt" target="show_file">Ticket Reject;Invalid Sponsor</a></li> <li><a href="2ND_LEVEL_SUBMISSION.txt" target="show_file">2nd Level General Responce</a></li> </ul> <iframe name="show_file" width="844" height="300"></iframe> <p> <img border="0" id="img1" src="button12.jpg" height="20" width="100" alt="Copy" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button13.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button12.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button14.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button13.jpg')" fp-style="fp-btn: Brick Column 9" fp-title="Copy"></p> </body> </html> -WinUser2003 Hello, I am new at web design, and frustrated by a Submit button constantly opening a new window instead of moving on in the current window. When coming to this forum to look for answers, I found a Submit button I then researched...and now I am even more confused! There's some code in the screen you see right after you log in, that looks like this: Quote: <script type="text/javascript"> <!-- document.write('<div style="margin-top:0px">'); document.write('<input type="submit" class="button" value=" Proceed " accesskey="s" onclick="window.location=\'http://www.htmlforums.com/f-html-xhtml-4.html/\'; return false" />'); document.write('</div>'); //--> </script> Clicking Submit does indeed move you on within the same window, but my questions a 1. How does this work when...it appears to be commented out! Note the <!-- and -->! And if these aren't commenting code out...then what are they there for? 2. What do all the forward and back slashes mean around the address? (I'm curious about the backslash right before the address, and then the forward and backslash right next to each other afterward) 3. I copied this code into my own page kind of like so: Quote: document.write('<input type="submit" class="button" value="Submit" onclick="window.location=\'newpage.html/\'; return false" />'); Every single time, clicking the button results in a white "This page cannot be displayed" screen--but then refreshing that screen causes the right page to come up! Does anyone know why it won't work the first time? Thanks in advance for any help that anyone can provide! Hey, I'm jst starting to learn html and I was someone could give me an example of how to create a a simple form with 2 input fields which are set to a value say "hello" in first field and "World" in second field when the button is clicked. Thanks I am creating a website that has a search button with an image. I would like to know if there is some simple code that I can include that would display the same basic image with a different color when the user mouses over the button. Here is the code: <FORM name="searchform" onSubmit="return validateSearch();" METHOD="POST" ACTION="search_results_lt.asp"> <INPUT TYPE="text" NAME="Search" VALUE="" SIZE="20" > <INPUT TYPE=IMAGE SRC="images/search_button.gif" Name="SearchButton" Value="Submit"> </FORM> **** Thanks for your help, Robin Can you please help me? I am making a website in MS SharePonit designer 2007. The site will be in 2 languages, Croatian and English. On the home page of the site I have put two radio buttons to give the choice to go to English version or Croatian version. And below those 2 radio buttons i want to put a button with text "ENTER SITE". But I don't know how to do this: If the Croatian radio button is checked, a click on the "ENTER SITE" must take you to the Croatian version of the site, and if English radio button is checked, click on "ENTER SITE" must take you to the English version. Can you please tell me how to do that? I need html code of an ad with close button and I also need html code of floating ad with close button.If someone knows how to do it , please post html. Hello everyone, I'm new here. I am having a problem making a button (well not a problem, but it is not how I would like it.) I have created a button using 2 images: Code: #navbar ul{ float:left; list-style: none; } #navbar ul li{ display:block; float:left; padding:10px 0 10px 10px; margin:10px 0 10px 10px; max-width:120px; min-width: 50px; background:url('images/button-left.png') no-repeat scroll top left; } #navbar ul li a{ display:block; color: #fff; text-decoration:none; padding:10px 15px 10px 5px; margin: -10px 0 0 -2px; font-weight:bold; text-align:left; background: transparent url('images/button-right.png') no-repeat scroll top right; } So, it works, and I could use it, but only the right image is the link, so I was wondering how I could also make the left image the link too. (btw I am sorry if the code is a mess, I usually tidy it up when I have finished ) Hey everyone, i'm a new member here hoping you can help me out please... I'm creating a basic game in Dreamweaver for a project and in this game, i have 25 questions and i have included a Skip button. I would like to limit the number of times this Skip button can be clicked to 5 so the user would have to attempt at least 20 questions and my questions are, is this possible? and if so, how do i do it? (I would preferably like the code to be HTML) Hope you can help me, thanks in advance. Rob i know i have an old thread titled "Please Read This" but that has gone off the topic now and im wondering if anyone can help me with a new problem im making a feedback form and have had tons of help from html forums but i got 1 more little thing i need 2 buttons to do this Lock/Unlock: Toggles Readonly on and off Set Record: Makes the field Read Only and makes the button disappear any help? Hi everyone, i have a site at www.everybody-ebooks.com, i would like to make a button at the homepage.I dont know what is the name of this button. What i'm trying to do is to make a following button "Request a book / ebooks" and it will follow on the screen even the visitor scroll up or down. So the button will stay on screen even scrolled. I hope anyone here will able to tell me what is the name for that button so that i can start my search on google or hopefully some guide where to start. Thank you. I need a button that will execute a chatbox aside from the plain Brown block with words. Code: <p>Welcome to the HackersLounge! Enter a username and click connect to start chatting!</p><p><applet code="EIRC" archive="http://centralchat.net/eirc/EIRC.jar, http://centralchat.net/eirc/EIRC-gfx.jar" width="620" height="400"><param name="mainbg" value="#e0e5f4" /><param name="mainfg" value="#000000" /><param name="textbg" value="#FFFFFF" /><param name="textfg" value="#000000" /><param name="selbg" value="#00007F" /><param name="selfg" value="#FFFFFF" /><param name="server" value="centralchat.net" /><param name="channel" value="#HackersLounge" /><param name="titleExtra" value=" - CentralChat.net" /><param name="username" value="java" /><param name="realname" value="CentralChat Java Chat" /><param name="nickname" value="CCuser????" /><param name="login" value="0" /><h2>CentralChat Java Chat</h2><p>Sorry- Java is required to use this chat box. You can use the <a href="http://www.centralchat.net/chatrooms/cgiirc.php?c=HackersLounge">alternate chat</a> instead. Hi i need some help with this code Code: HTML_print("<form name=\"kas\" method=\"POST\" action=\"/\">"); HTML_print("<input type=\"submit\" name=\"%\" id=\"kas\" value=\"LED\">"); HTML_print("</form>"); this is basic button after which i pressd i need send data % to server but at the moment it sends % after page is loaded how to make this work that % woud be send just after button LED is pressed?? i am totaly beginer in html this is for my project with Arduino controled robot Hey! I am new to this site... So if this is in the wrong section, I'm sorry! Ok, I am kinda new to HTML and I am not too sure about some stuff. The thing I am having trouble with is buttons... I have little graphic things for my buttons... and I can't figure out how to make it so you can click on it and it will go to another window... So, can somebody help? Thanks in advance! Hello, I would like to move my button or <FORM> to different position than at the default location. How can I do that? I need help with this html, i need the submit button to email the forms to: mariamarias@hotmail.com instead of redirecting you to another webpage Please help me!!!!!!!!!!!!!!!!!!! Code: Please enter your account number and your password.<BR> <A HREF="?subtopic=createaccount">Create an account </A> if you do not have one yet.<BR><BR> <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="#505050" CLASS=white><B>Account Login</B></TD></TR> <TR><TD BGCOLOR="#D4C0A1"> <FORM ACTION="https://secure.tibia.com/account/?subtopic=accountmanagement" METHOD=post> <TABLE BORDER=0 CELLPADDING=1> <TR><TD>Account number:</TD><TD><INPUT TYPE=password NAME="ACCOUNTLOGIN_ACCOUNTID" SIZE=10 MAXLENGTH=10></TD></TR> <TR><TD>Password:</TD><TD><INPUT TYPE=password NAME="ACCOUNTLOGIN_PASSWORD" SIZE=30 MAXLENGTH=29></TD></TR> </TABLE> </TD></TR> </TABLE> <BR> <TABLE BORDER=0 WIDTH=100%> <TR><TD ALIGN=center><IMG SRC="https://static.tibia.com/images/global/general/blank.gif" WIDTH=70 HEIGHT=1 BORDER=0><BR> </TD><TD ALIGN=center> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><INPUT TYPE=image NAME="Submit" SRC="https://static.tibia.com/images/global/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE> </TD><TD ALIGN=center> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://secure.tibia.com/account/?subtopic=lostaccount METHOD=post><TR><TD><INPUT TYPE=image NAME="Account lost?" ALT="Account lost?" SRC="https://static.tibia.com/images/global/buttons/sbutton_accountlost.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE> </TD><TD ALIGN=center> Hi everyone, I would really appreciate your help here. I'm not entirely sure if this is html or javascript but... I would like to create a button which is disabled until a certain link is clicked on the webpage... If this possible at all? Thank you Paul Hello! I am trying to create a box (size, height: 3 centimeters width:2 centimeters) with a MODIFIABLE text ("http://www.dayli.com/contentnumber="). That text has to be a URL and below the box a button to GO directly to that URL. Something like the box of http://www.google.com/gwt/x? Can somebody help me? Thank you. |