How to make a div clickable and still be w3c compliant

Can someone help me to make a div clickable so it is still w3c compliant?This is my current div and it seems to work, but when I check for compliance I get "unexpected end tag (a not expected). ???
<div id="pic-wrapper">
<a href="../index.htm"><div id="pic"></div></a></div>
Appreciate any help. Thank you.

This is something I've never needed to do mysefl, but it ought to work ok.  And do not remove your standard a tag with its link currenlty inside the div so Search Engines will be able to spider the link and users without javascript will be able to reach it as well.  I've added the code in orange:
<div id="pic-wrapper" onclick="location.href='http://www.yourwebsite.com/index.htm';" style="cursor: pointer;">
<a href="../index.htm"><div id="pic"></div></a></div>
I just guessed your link was to the homepage, so that is what I replicated in orange, but of course you would be sure to change the link to the correct absolute address.
Let us know how this works for you.
E. Michael Brandt
www.divahtml.com
www.divahtml.com/products/scripts_dreamweaver_extensions.php
Standards-compliant scripts and Dreamweaver Extensions
www.valleywebdesigns.com/vwd_Vdw.asp
JustSo PictureWindow
JustSo PhotoAlbum, et alia

Similar Messages

  • In Yosemite, I can;t operate for more than a few minutes with Keychain or Safari asking for my login password.  How can I turn this off, and still be safe?

    Using Yosemite, I an't seem to work for more than a few minutes without being asked for my login password.  Keychain wants it, Safari wants it, iCloud wants it..the list goes on.  Then in 10 minutes or so, they all want it again.  Passwords are being stored by Safari as usual, but new tabs or pages bring up the request.  How can I turn this off and still have protection?

    Tutorial: Resolving Keychain Issues
    If you can't access your keychain, or forget your password If you can't get into your keychain file because you've forgotten your password or the keychain file appears to be corrupt, there are a couple of options.
    First, if you've forgotten your password, you can use the "Keychain First Aid" utility to make the keychain password the same as the login password. This can be accomplished via the following process:
      1. Open Keychain Access (located in Applications/Utilities)
      2. Go to the "Keychain Access" menu and select "Preferences"
      3. Click the "First Aid" tab
      4. Make sure the "Synchronize login keychain password" box is checked
      5. Close the Preferences window
      6. Go to the "Keychain Access" menu and select "Keychain First Aid"
      7. Enter your username and password
      8. Click the "Repair" button
    The second option is to completely delete your keychain then recreate it. This routine is useful if your keychain appears to be corrupt or otherwise inaccessible. This can be accomplished as follows:
      1. Launch Keychain Access (located in Applications/Utilities)
      2. Click "Show Keychains" in the lower-left corner of the window.
      3. Select the problematic keychain from the left-hand pane.
      4. Navigate to the "File" menu and select "Delete Keychain '(name of keychain)'"
      5. Check all options for deletion and press "OK"
      6. Create a new keychain by going to the "File" menu, then "New" and selecting
          "New Keychain"
      7. You can now make this keychain your default if you desire by selecting it, then
          going to the "File" menu and selecting "Make '(name of keychain)' Default"
    Login as root and perform repair In some cases, problems with keychains can only be resolved when logged in as the root user.
    First, you want to enable the root user:
      1. OS X Mountain Lion: Enable and disable the root user
      2. OS X Lion: Enable and disable the root user
      3. Mac OS X 10.6: Enabling the root user
      4. Enabling and using the "root" user in Mac OS X
    After enabling the root user, and logging in under this account, again open Keychain Access. First attempt repairs using Keychain First Aid, and failing that, delete then recreate the keychain as described above while logged in as root.
    Persistently asked for stored passwords If you are persistently asked for passwords in various applications that you have specified should be remembered in a keychain, your "login" keychain may not be active for one reason or another.
    Navigate to ~/Library/Keychains/ (this is the Library folder inside your user's home folder). Find the file named "login.keychain" and double-click it.
    Failing that, select the "login" keychain within the Keychain Access application and make sure it is the default keychain by going to the "File" menu and selecting "Make 'Login' Default"
    Turn off Keychain synchronization in applications having problems If specific applications are experiencing issues when accessing password-protected material, the Keychain may be to blame.
    The above comes from an article published on MacFixit.com.

  • How to make an checkbox editable and uneditable within a single alv output.

    Hi,
    How to make an checkbox editable and uneditable within a single alv output depending on condition.
    I have used Reuse_alv_grid_display.
    In my output every checkbox is editable. i have used edit = 'X'.
    I want editable checkbox for correct value and uneditable checkbox for incorrect value in a single alv

    >
    Mukilansap wrote:
    > I want editable checkbox for correct value and uneditable checkbox for incorrect value in a single alv
    Use alv styles to achieve this, set the style for each record before displaying the ALV. Structure LVC_S_STYL.
    Take a look at the example BCALV_EDIT_02, it is OOPS based, but check how the style table is filled.
    regards,
    Advait

  • How to make google come up and not yahoo when i click anew tab

    how to make google come up and not yahoo when i click a new tab
    == This happened ==
    Every time Firefox opened
    == today

    You can use 1 of these add-ons
    [https://addons.mozilla.org/en-us/firefox/addon/newtaburl/?src=search
    NewTabURL ]
    [https://addons.mozilla.org/en-us/firefox/addon/new-tab-homepage/?src=search New Tab Homepage]
    with NewTabUrl you have more options
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • Adobe Captivate 7 Project How to make Rollover cations, audio, and video work in HTML format?

    Adobe Captivate 7 Project How to make Rollover cations, audio, and video work in HTML format?

    Honestly, I don't even know why this is an option. The conversion to Flash is completely unusable.
    I have exported some things to Flash, and since I program in Flash all the time I was able to manipulate to work to some degree. Most text captions are built with multiple elements and completely fall apart.
    Sorry, I can't be of more help.

  • How to make images fade in and out

    how to make images fade in and out continuously

    HI,
    The Ken Burns effects can do this nicely. Available in the iLife suite of software.
    iLife 06 minimum requirements:
    http://support.apple.com/kb/HT2675
    iLife 06 - Amazon
    Carolyn

  • How do i skip process validations and still update the model?

    how do i skip process validations and still update the model? This has got to be a bug or a really huge design flaw. And no I don't want to using 'binding' to bind to every component on my form just so I can set its value. I just want to use value binding.
    Perhaps there should be a FacesContext.getCurrentInstance().updateModel() method?

    how about if I want clear the form or load a new model:
    <h:commandButton action="#{customer.clear_action}" immediate="true" value="clear" />
    <h:commandButton action="#{customer.load_action}" immediate="true" value="load" />
    public void clear_action() {
    Customer c = new Customer();
    this.setBean("customerModel",c);
    FacesContext context = FacesContext.getCurrentInstance();
    context.renderResponse();
    public void load_action() {
    Customer c = new Customer(1000);
    this.setBean("customerModel",c);
    FacesContext context = FacesContext.getCurrentInstance();
    context.renderResponse();

  • How do i delete imovie videos and still have them on my time capsule

    how can i delete imovie videos and still have them on my timecapsule

    You can copy them to the TC.. do not expect Time Machine to keep something that you delete though..
    And please recognise you are breaking the idea of Time Capsule.. it is primarily a backup target for TIme Machine.. once you move files to the TC and delete them on the computer.. the only copy of the file is now on the TC.. which has no automated backup.. no easy means of recovery if the drive fails. no parts even.. Apple do not fix.. they give you a replacement and chuck your old one.
    You are hoping that the TC will preserve your files.. when it is well known to be a less than reliable device.
    Think hard if this is really where you want to go.

  • When you change PC how to make connection with iphone and new PC

    when you change PC how to make connection with iphone and new PC

    Yes, you can do it the same as any other database. The code would be similar.
    I'd also suggest you not to use the JDBC ODBC bridge for connection. There are other drivers available for that.
    Regards
    xH4x0r

  • How to make custom binary module and add to powershell?

    How to make custom binary module and add to powershell?
    I wish to add 'Microsoft.SharePoint.Client.dll' in powershell as binary module so I can use its intellisense.

    Hi Biraj,
    I replied to this in other thread
    https://social.technet.microsoft.com/Forums/en-US/a13c9cc8-7d53-46b5-b5bb-65404db2d347/how-to-make-intellisense-enable-in-powershell-in-csom-for-sharepoint-online?forum=sharepointdevelopment
    Kind Regards,
    John Naguib
    Senior Consultant
    John Naguib Blog
    John Naguib Twitter
    Please remember to mark this as answered if it helped you

  • I have bought the new Iphone5. The old phone "Iphone4" has the same account as my daughters iphone 4. Now I would like to have separat accounts, is that possible? Can I make a new account and still make a copy of my iphone 4 to my new iphone 5?

    I have bought the new Iphone5. The old phone "Iphone4" has the same account as my daughters iphone 4. Now I would like to have separat accounts, is that possible? Can I make a new account and still make a copy of my iphone 4 to my new iphone 5?

    You need to plan. Check this tip:
    iOS 5 & iCloud Tips: Sharing an Apple ID With Your Family

  • How to make form fields "Clickable"

    Hey Guys,
    I created a Fillable PDF Form with Form fields using ADOBE Acrobat 9.0 Pro-Ex + LiveCycle Designer for Windows XP.
    My question is when you create a form, is there a way to make form fields "clickable" instead of just auto-tab? Because if you mess up when filling out the form, you don't want to have to tab through the whole document just to get back to that spot. How can i fix that?
    My other question is, when printing the form, the form field "text boxes" always show up. Is there a way to hide the boxes and just print the form without them. (The information that was filled in will still show, just the outline of the boxes won't?)
    Thanks a bunch,
    Joseph

    Unfortunately I don't know enough about Designer to tell you what you did to make the boxes unclickable, but for me I've never had an issue doing that.
    However, I can tell you what you need to do to get rid of the boxes around each of your text fields.
    1. In design mode, select the field(s) you wish to get rid of the borders on. (If all you have are text fields, you can press Ctrl+A to select all fields. If not, you can hold down the Ctrl button while left-clicking each field to change all text fields at once.)
    2. Open the Object window (Shift+F7 toggles this on and off). Find the option for Appearance.
    3. Click the drop down menu next to Appearance and choose none.
    4. The borders will now be gone from the text fields.

  • Fixed: How to remember the DataTable state and still use buttons

    Lets say that you have a DataTable on a page, with a bunch of hyper links and buttons on the same page (for navigation to various parts of your application). If you use the built in pagination and sorting, you will find that the following behaviour:
    1. DataTable remembers its state (sorting, page number, etc.) if you click on any hyper link. You can even go back to a different page, and then come back to the original page to find that your DataTable is in the state you left it (very cool, it is session scope and works as intended).
    2. If you click on any button, DataTable does not remember its previous state (goes back to page 1 and default worting, etc.). After playing around with it and going nuts, I discovered the way to use Button and still have the DataTable remember its state. I wanted to share it with the rest of you:
        public String btnClose_action() {
            try {
                this.getExternalContext().redirect("faces/users.jsp");
            } catch (Exception ex) {
                log("Error: userDetail > btnClose_action", ex);
            return null;
        }This was my original post:
    http://swforum.sun.com/jive/thread.jspa?threadID=103583
    Message was edited by:
    Sabir

    II think there should be a property
    to disable form submission on buttons. There is!
    To make the form not be submitted by a button click:
    1. In the Visual Designer, select the button.
    2. In the Properties window set the JavaScript > onClick property to return false;
    This might interest you: http://blogs.sun.com/divas/entry/disabling_a_button_after_it

  • How to make shape objects clickable/selectable in transformgroups in java 3

    I am building a visualizer program that has Java 3D components inside Swing components. I have a branchgroup inside a canvas3d inside a simpleuniverse, which is added to a JTabbedPane. Inside the branchgroup I have multiple transformgroups each with one shape in them (box, cone, sphere, cylinder). Each transformgroup has the ability to rotate, zoom, and tranlate objects because I have incorperated a MouseZoom, MouseRotate, and MouseTranslate object as from the Java 3D library functions (these are applied to each transformgroup every time one is created and added to the branchgroup). My problem is that I am trying to make these shapes clickable/sectable/dragable/dropable on the screen - currently when I try to translate ONE object all the shapes move on the screen and I cannot get just one shape to move (all shapes move when I only want one to). How do I make only one shape move when it is clicked?
    I know the question is kind of out there and specific so if anyone knows how to generically give transformgroups/shapes drag and drop properties that would also help a great deal. Does anyone know how to to this? Thanks a ton.

    shape uses the contains and intersects methods, is that what you need? Without code it is hard to guess what is required.

  • How to make a sphere clickable

    Hi guys,
    I've been programming in Java for a while, and am very new to Java3D. I have the code below which displays a simple sphere in a box. I have some things I'd like to do but am unsure of how to go about them.
    import com.sun.j3d.utils.geometry.*;
    import com.sun.j3d.utils.universe.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import com.sun.j3d.utils.behaviors.mouse.MouseWheelZoom;
    import java.awt.event.*;
    import java.awt.event.WindowAdapter;
    import java.awt.*;
    public class prototype1 {
    public prototype1() {
    SimpleUniverse universe = new SimpleUniverse();
    BranchGroup group = new BranchGroup();
    Sphere sphere = new Sphere(0.5f);
    TransformGroup maing = new TransformGroup();
    maing.addChild(sphere);
       group.addChild(maing);
       Color3f light1Color = new Color3f(1.8f, 0.1f, 0.1f);
       BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
       Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);
       DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);
       light1.setInfluencingBounds(bounds);
       group.addChild(light1);
       universe.getViewingPlatform().setNominalViewingTransform();
       universe.addBranchGraph(group);
    public static void main(String[] args) { new prototype1(); }
    }The first thing I cannot do is figure out how to resize the window that the sphere appears in.
    The second thing I cannot do is to make the sphere clickable, so that when you click on it a simple System.out.println occurs. I have looked around and found a group.setPickable(true); sort of statement, can this be applied here? Or is a better method to have a button over the sphere and make it invisible? Or is there some way to detect the co-ordinates of the panel that have been clicked? If anyone has any ideas or can point me towards some good tutorials that would be fanatastic,
    Thanks
    Beccy

    Hi!
    Right have figured out the first problem by myself!
    This is my code so far:
    import com.sun.j3d.utils.geometry.*;
    import com.sun.j3d.utils.universe.*;
    import javax.media.j3d.*;
    import javax.swing.BoxLayout;
    import javax.swing.JFrame;
    import javax.vecmath.*;
    import com.sun.j3d.utils.behaviors.mouse.MouseWheelZoom;
    import java.awt.event.*;
    import java.awt.*;
    public class prototype1 {
    public prototype1() {
         JFrame.setDefaultLookAndFeelDecorated(true);
         JFrame frame = new JFrame("Prototype Visualisation");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         Panel canvasPanel = new Panel();
         canvasPanel.setLayout(new BoxLayout(canvasPanel, BoxLayout.Y_AXIS));
         GraphicsConfiguration config = SimpleUniverse
                .getPreferredConfiguration();
         Canvas3D canvas = new Canvas3D(config);
         canvas.setSize(700,450);
         canvasPanel.add(canvas);
         frame.add(canvasPanel);
         frame.pack();
         frame.setVisible(true);
       SimpleUniverse universe = new SimpleUniverse(canvas);
       BranchGroup group = new BranchGroup();
       Sphere sphere = new Sphere(0.1f);
       sphere.setPickable(true);
       TransformGroup maing = new TransformGroup();
       maing.addChild(sphere);
       group.addChild(maing);
       Color3f light1Color = new Color3f(1.8f, 0.1f, 0.1f);
       BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
       Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);
       DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);
       light1.setInfluencingBounds(bounds);
       group.addChild(light1);
       //group.setPickable(true);
       universe.getViewingPlatform().setNominalViewingTransform();
       //TransformGroup cameraTransform = universe.getViewingPlatform().getViewPlatformTransform();
       //cameraTransform.setTransform(getCameraTransform(5.0));
       // add the group of objects to the Universe
       universe.addBranchGraph(group);
    public static void main(String[] args) { new prototype1(); }
    }

Maybe you are looking for