Css code for hover and replace image

on my page i would like my visitors to hover over a div that contains text and have an image appear, would need to work in most browsers and  not disrupt any other div tags on my page.  is there some simple css code to do this?

Initially set the display for the <img> to none, then set it to block/inline in the parent <div> :hover rule.
> not disrupt any other div tags on my page
If you mean you want the image to occupy its space even when it's not shown, you can use visibility: visible/hidden instead.
Kenneth Kawamoto
http://www.materiaprima.co.uk/

Similar Messages

  • Example codes for each and every class in API

    hi,
    Is there any place where i can get example code for eacha and every class in java API.
    for eample...if i wanna find sample codes for all the clases in java.lang.*
    please let me know ASAP.
    thanks in advance

    Try this
    http://www.javaalmanac.com/egs/
    It's almost complete, but you could help mr. Patrick Chan to write more samples for the few classes left in the Java API...

  • Can you send a code for iTunes and have it still work

    Can you send a code for iTunes and have it still work

    Did you get this in an email from Apple? Are there instructions in the email?
    Typically the way that you redeem a gift card is to go to either the app store or iTunes - go to the featured tab in the app store or the music tab in iTunes - swipe to the bottom of the screen. Tap on Reedem at the bottom and go from there.
    OK. I'm a little dense tonight. Now I get it. Like Meg said, you will know soon enough.
    Message was edited by: Demo

  • Language codes for 'english' and 'english-2' must differ?

    I am trying to build my project but as I do I get the following pop up: Compiler: Language codes for 'english' and 'english-2' must differ. What do I need to change?

    You have added a language to your project which you don't need. Look in the outline view at the bottom for the folder called langauges, then delete the second one. Both will be English and this cannot be the case on a DVD - the player will not know which assets to use on a menu if there are two langauges the same.
    The languages are used when you want to create a disc that will display the correct menu backgrounds when used in players in different countries - the DVD player settings will have a language set up, and the DVD will use the appropriate language files to construct the menus accordingly.

  • Why isn't there yet an available p2p embeded code for voip and video conference in Firefox??

    why isn't there yet an available p2p embeded code for voip and video conference in Firefox??

    So, the upload time will vary on internet connection. If there is an issue with how fast it is uploaded you can check if prefetching is turned on, but this does not really affect uploading [https://developer.mozilla.org/en-US/docs/Controlling_DNS_prefetching Controlling DNS prefetching]
    If you search for solutions, you will see a bunch of tweaks as well that may be helpful to your specific computer. [[Upgrade your graphics drivers to use hardware acceleration and WebGL]] to make sure you are all up to date as well.

  • LSMW: Process code for DEBMDM and CREMDM

    Hi Can anyone tell me the process code for DEBMDM and CREMDM? I would like to use the IDOCs for uploading master data information.
    If you do not know the function module can you tell me what function module each one calls?
    Thanks,
    S.

    Hi you have to split this idoc into ADRMAS and CREMAS, not possible to upload CREMDM directly to Sap.
    Cheers
    Antonio

  • GUI Based tool for search and replace using regular expression

    Hi,
    I have developed this small tool which can be used for search and replace in multiple files using reqular expressions.
    Features:
    1. Full regular expression
    2. GUI based with Highlighted results
    3. Preview for replace available
    4. Pure Java based.
    5. Its like unix sed and grep
    Please visit below site for download/more information :
    http://sourceforge.net/projects/regexsearchrepl/
    Thanks,
    Hitesh Viseria

    I agree with you, it cannot compete grep/sed/awk combination. I couldnt find anything even close to grep/sed for windows which will also have a preview and most important, free. That is what made me write this tool. I am trying to
    improve its performance and more features like history etc.
    Any suggestions on additional features are most welcome.

  • How to write code  for totals and subtotals in alv programing?

    how to write code  for totals and subtotals in alv programing?

    hi,
    1. <u><b>TOTAL.</b></u>
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
    2. <u><b>How do I add subtotals</b></u>
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    Regards
    Anver

  • Definig tax codes for sales and procedure

    Hi,
    I am getting an error in definig tax codes for sales and procedures.It's asking for Tax Jurisdiction.But can't accept whatever I enter.Please advice.

    Check availability at SPRO-Financial Accounting (New)-Tax on Sales/Purchases-Basic Settings-Specify Structure for Tax Jurisdiction Code   OR Define Tax Jurisdictions
    Srinivas

  • Example code for each and every class in java API

    hi,
    Is there any place where i can get example code for eacha and every class in java API.
    for eample...if i wanna find sample codes for all the clases in java.lang.*
    please let me know ASAP.
    thanks in advance

    Crossposted here: http://forum.java.sun.com/thread.jsp?thread=570264&forum=54&message=2820774

  • Lanuage codes for 'english' and 'english-2' must differ ERROR

    Hello, I'm trying to burn a single layer DVD for a clent of mine and whenever I pressthebuiold/format button a error that states: (lanuage codes for 'english' and 'english-2' must differ) pop up. I have been using DVD studio for some time now and have never ran into this. I don't belive I have changed any settings. anyone have any answers?
    thank you for your time
    Mike

    Hi Mike
    This is a common problem. You've added a second language by mistake and it's the same as the 1st one.
    Look at the bottom of your outline and you'll see "English" and "English-1". Delete "English-1" and re-build.

  • DWCC2014.1 - When Inserting an Image, all code is wiped and replaced with HTML framework containing an iFrame

    I recently upgraded to DW CC 2014.1 on my Mac - which caused me a number of issues. But the one I'm facing right now is very strange.
    Whenever I try to insert an image - either via the shortcut, or through the top level dropdown dialogue - when the file browser comes up, all of my HTML code disappears, to be replaced with a starter template and an iframe. This happens about 90% of the time - but it sometimes works correctly, and I can't figure out why it does work that 10%.
    Usually, I can just cancel the file browser and Undo to get my code back. But occasionally that doesn't work (and neither does Revert), and I have to close the document and re-open to my last save.
    Here's what appears when my code vanishes:
    Anybody know what's happening here? I don't use any specially created shortcuts. I've run into several issues with 2014.1 that have impacted my productivity, and it's getting increasingly frustrating.

    I am experiencing the same issue.
    Environment: Mac Pro 6,1/OS X 10.9.5/DreamWeaver CC 2014.1 6947 Build
    Relevant software: DefaultFolder X 4.6.10 (16690)
    Steps:
    1) Position cursor on its own line in Code panel of Split View.
    2) Press Cmd+Option+I [OR] select Insert > Image > Image
    3) Navigate to image using file browser
    4) Click OK
    5) Repeat the above steps to insert a second image
    Result with DefaultFolder X active:
    1) The first insert completes as expected [OR] all HTML code between opening and closing body tags disappears, and a frame tag with a source attribute pointing to the file itself is inserted after the closing head tag
    2) For subsequent inserts:
    If the first insert completed as expected: If the cursor is indented from farthest-left,  all HTML code between opening and closing body tags disappears, and a frame tag with a source attribute pointing to the file selected in the first insert appears after the closing head tag. If the cursor is not indented, *most* subsequent attempts will reproduce the issue
    If the first insert produced the issue: all subsequent inserts will reproduce the issue, and the frame source will be the file itself
    Result with DefaultFolder X disabled:
    1) The first insert completes as expected [OR] all HTML code between opening and closing body tags disappears, and a frame tag with a source attribute pointing to the file itself is inserted after the closing head tag
    2) For subsequent inserts:
    If the first insert completed as expected: If the cursor is indented from farthest-left,  all HTML code between opening and closing body tags disappears, and a frame tag with a source attribute pointing to the file itself, no matter what file is selected in the file browser dialog, appears after the closing head tag. If the cursor is not indented, *most* subsequent attempts will reproduce the issue
    If the first insert produced the issue: all subsequent inserts will reproduce the issue, and the frame source will be the file itself

  • Safest CSS code for background image rotation?

    I currently use 4 different images to do rounded corner captions, and it occurred to me that I could just be using one and rotate it, if such a thing is actually possible.
    Is it?
    The images are actually table cell backgrounds, so it would have to be for background rotation, and it would have to be compatible will all major browsers.

    if such a thing is actually possible.
    That would require working with CSS transform properties and since they just like the native rounded corner property are CSS3, which is not yet consistently working in all browsers, it is not safe. Of course one might also be able to use jQuery and such, but why complicate the source code? Stick with your images.
    Mylenium

  • As3 / mouse hover and enlarge image code

    Good Evening,
    Would anyone be kind enough to share the as3 code that makes a "movie clip" image enlarge and change opacity with a eased tween on a mouse over, and then go back in reverse when the mouse leaves.
    Thanks as always,
    [email protected]

    For what it is worth, I believe this problem is fixed in Rh10.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to change this code to drag and drop image/icon into it??

    Dear Friends:
    I have following code is for drag/drop label, But I need to change to drag and drop image/icon into it.
    [1]. code 1:
    package swing.dnd;
    import java.awt.*;
    import javax.swing.*;
    public class TestDragComponent extends JFrame {
         public TestDragComponent() {
              super("Test");
              Container c = getContentPane();
              c.setLayout(new GridLayout(1,2));
              c.add(new MoveableComponentsContainer());
              c.add(new MoveableComponentsContainer());
              pack();
              setVisible(true);
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception ex) {
                   System.out.println(ex);
              new TestDragComponent();
    }[2]. Code 2:
    package swing.dnd;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.awt.dnd.*;
    import java.awt.datatransfer.*;
    import java.awt.image.*;
    import java.awt.dnd.DragSource;
    import java.awt.dnd.DropTarget;
    public class MoveableComponentsContainer extends JPanel {     
         public DragSource dragSource;
         public DropTarget dropTarget;
         private static BufferedImage buffImage = null; //buff image
         private static Point cursorPoint = new Point();
         public MoveableComponentsContainer() {
              setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED, Color.white, Color.gray));
              setLayout(null);
              dragSource = new DragSource();
              ComponentDragSourceListener tdsl = new ComponentDragSourceListener();
              dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY_OR_MOVE, new ComponentDragGestureListener(tdsl));
              ComponentDropTargetListener tdtl = new ComponentDropTargetListener();
              dropTarget = new DropTarget(this, DnDConstants.ACTION_MOVE, tdtl);
              setPreferredSize(new Dimension(400,400));
              addMoveableComponents();
         private void addMoveableComponents() {
              MoveableLabel lab = new MoveableLabel("label 1");
              add(lab);
              lab.setLocation(10,10);
              lab = new MoveableLabel("label 2");
              add(lab);
              lab.setLocation(40,40);
              lab = new MoveableLabel("label 3");
              add(lab);
              lab.setLocation(70,70);
              lab = new MoveableLabel("label 4");
              add(lab);
              lab.setLocation(100,100);
         final class ComponentDragSourceListener implements DragSourceListener {
              public void dragDropEnd(DragSourceDropEvent dsde) {
              public void dragEnter(DragSourceDragEvent dsde)  {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dragOver(DragSourceDragEvent dsde) {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dropActionChanged(DragSourceDragEvent dsde)  {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dragExit(DragSourceEvent dse) {
                 dse.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
         final class ComponentDragGestureListener implements DragGestureListener {
              ComponentDragSourceListener tdsl;
              public ComponentDragGestureListener(ComponentDragSourceListener tdsl) {
                   this.tdsl = tdsl;
              public void dragGestureRecognized(DragGestureEvent dge) {
                   Component comp = getComponentAt(dge.getDragOrigin());
                   if (comp != null && comp != MoveableComponentsContainer.this) {
                        cursorPoint.setLocation(SwingUtilities.convertPoint(MoveableComponentsContainer.this, dge.getDragOrigin(), comp));
                        buffImage = new BufferedImage(comp.getWidth(), comp.getHeight(), java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE);//buffered image reference passing the label's ht and width
                        Graphics2D graphics = buffImage.createGraphics();//creating the graphics for buffered image
                        graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));     //Sets the Composite for the Graphics2D context
                        boolean opacity = ((JComponent)comp).isOpaque();
                        if (opacity) {
                             ((JComponent)comp).setOpaque(false);                         
                        comp.paint(graphics); //painting the graphics to label
                        if (opacity) {
                             ((JComponent)comp).setOpaque(true);                         
                        graphics.dispose();
                        remove(comp);
                        dragSource.startDrag(dge, DragSource.DefaultMoveDrop , buffImage, cursorPoint, new TransferableComponent(comp), tdsl);     
                        revalidate();
                        repaint();
         final class ComponentDropTargetListener implements DropTargetListener {
              private Rectangle rect2D = new Rectangle();
              Insets insets;
              public void dragEnter(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void dragExit(DropTargetEvent dte) {
                   paintImmediately(rect2D.getBounds());
              public void dragOver(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void dropActionChanged(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void drop(DropTargetDropEvent dtde) {
                   try {
                        paintImmediately(rect2D.getBounds());
                        int action = dtde.getDropAction();
                        Transferable transferable = dtde.getTransferable();
                        if (transferable.isDataFlavorSupported(TransferableComponent.COMPONENT_FLAVOR)) {
                             Component comp = (Component) transferable.getTransferData(TransferableComponent.COMPONENT_FLAVOR);
                             Point location = dtde.getLocation();
                             if (comp == null) {
                                  dtde.rejectDrop();
                                  dtde.dropComplete(false);
                                  revalidate();
                                  repaint();
                                  return;                              
                             else {                         
                                  add(comp, 0);
                                  comp.setLocation((int)(location.getX()-cursorPoint.getX()),(int)(location.getY()-cursorPoint.getY()));
                                  dtde.dropComplete(true);
                                  revalidate();
                                  repaint();
                                  return;
                        else {
                             dtde.rejectDrop();
                             dtde.dropComplete(false);
                             return;               
                   catch (Exception e) {     
                        System.out.println(e);
                        dtde.rejectDrop();
                        dtde.dropComplete(false);
    }Thanks so much for any help.
    Reagrds
    sunny

    Well, I don't really understand the DnD interface so maybe my chess board example will be easier to understand and modify:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=518707
    Basically what you would need to do is:
    a) on a mousePressed you would need to create a new JLabel with the icon from the clicked label and add the label to the glass pane
    b) mouseDragged code would be the same you just repaint the label as it is moved
    c) on a mouseReleased, you would need to check that the label is now positioned over your "drop panel" and then add the label to the panel using the panels coordinates not the glass pane coordinates.

Maybe you are looking for

  • Login to a website through java

    Hello there. I have been tinkering with an idea to make life easier for me in the long run whice should result in a java program which can sorte data from a website to make it easily accesable (then it is now) Now my problem is that i have no idea ho

  • Opening XLSX documents in document library failing

    Hi All,  I have just noticed a strange behavior within our SharePoint Document Library. The excel documents that end with .xls format open up fine in the native excel application, files ending with .xlsx however attempt to open within the browser and

  • Running external model on MBP - how do I turn off notebook display?

    I mirrored the monitor, then put computer to sleep. But, when I hit my usb mouse button, or any key on my bluetooth keyboard nothing happens. Monitor does not come on. Any help would be helpful.

  • Report to show the list of Equipment with Attachment.

    Hi Experts, i have attached a file in Equipment Master IE02. Any report can show the list of equipment with attachments? Please advise. Thank You Best Regards

  • Sending nested structure in PostLVUserEvent

    Hi All, I getting an exception when calling a c++ dll which has PostLVUserEvent to trigger the LabVIEW event structure. This dll has typedef stuct as described below (nested structure type), the same data structure is sent using PostLVUserEvent to th