LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-05-2013, 10:30 AM   #1
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 229

Rep: Reputation: Disabled
how to do a mouse over in CSS: a hover-engine


good day dear linux-experts.


well i currently try to iron out a way of css - rework of a existing
system:

i run joomla on the page http://maedchenhaus.org

on this page i have a image slider up and running. See the right-block. in this block there are some images visible..

so far so good: now i want to apply a special css:
note; i have had some firebug views on the system: and with that i saw that the we can apply a special kind of css.


see this one: http://www.cssplay.co.uk/menu/magnify.html


Magnify an image - see the three pictures

1.flower 3.animal and 3. bird

that is so cool I could we do that in css

http://www.cssplay.co.uk/menu/magnify.html


btw: can we do this like so:

I was thinking the script would be simular to this:

<img src="image.jpg" onmouseover="width='200px'" onmouseout="width='100px'''>

If it is possible can the image load up in another layer so it doesnt resize any content on the page

That would be most greatful - again; can we adopt this in Joomla?!


what do you think?

above all many thanks for sharin your ideas & thoughts

say
 
Old 07-06-2013, 03:19 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
Things like that you do with javascript. Does Joomla usually work with a js-library like jquery? You can see in the source code of the page, in the header section, whether it is loaded. If so take a look at their site and documentation. You can easily hook events to carry out tasks like changing css properties with it. Probably there is a plugin available that exactly fits to your needs.

cheers, j

added:
Quote:
If it is possible can the image load up in another layer so it doesnt resize any content on the page
You can use z-index property in css for this but only with position: absolute;

Last edited by j-ray; 07-06-2013 at 05:25 AM. Reason: added some info
 
Old 07-06-2013, 05:21 AM   #3
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 229

Original Poster
Rep: Reputation: Disabled
hello dear J-ray

Quote:
Originally Posted by j-ray View Post
Things like that you do with javascript. Does Joomla usually work with a js-library like jquery? You can see in the source code of the page, in the header section, whether it is loaded. If so take a look at their site and documentation. You can easily hook events to carry out tasks like changing css properties with it. Probably there is a plugin available that exactly fits to your needs.

cheers, j
many thanks for the quick reply i will dig deeper into that. And yes: i will have a closer look at the extension and plugin database over at extensions.joomla.org

btw: did you recongnize that this is doable within the template by havin a closer look at the it with FireBug!?
in other words: can FireBug help here - in developing a hover engine!?


cheers
say
 
Old 07-07-2013, 04:27 AM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
Firebug is a very helpful tool in general. You can google for magnifier examples like this one here:

http://cssdeck.com/labs/magnifying-g...query-and-css3
 
Old 07-16-2013, 04:42 PM   #5
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 229

Original Poster
Rep: Reputation: Disabled
hi there good day dear J-ray

many many thanks for the kind words - and the help. Well i like firebug very very much


Quote:
Originally Posted by j-ray View Post
Firebug is a very helpful tool in general. You can google for magnifier examples like this one here:

http://cssdeck.com/labs/magnifying-g...query-and-css3

regarding the mouseover-thing. I guess there would be some way to "adopt" a method that runs as standalone into the Joomla framework, but really it is mostly just a CSS thing that we can add to our template stylesheet - over at http://www.maedchenhaus.org


Well J-Ray: Here is a very nice and quick and dirty example on codepen.io : http://www.codepen.io/jdwires/pen/skpby i like it alot!

We can do some minor changes: eg. Change the class names to something to better fit our needs. The basics are
  • Put thumbnail and large image onto page next to each other.
  • Wrap the two images in a link
  • Apply container style to link
  • Apply large style to large image

Below is the markup and CSS. Again - we can see it in action on the codepen link above. see the
nice and quick and dirty example on codepen.io : http://www.codepen.io/jdwires/pen/skpby



Code:
<a class="mouseover-thumbnail-holder">
  <img src="http://placehold.it/150x150/ddf" alt="">
  <img class="large-thumbnail-style" src="http://placehold.it/250x250/ddf" alt="">

</a> 
<a class="mouseover-thumbnail-holder">
  <img src="http://placehold.it/150x150/fdd" alt="">  
  <img class="large-thumbnail-style" src="http://placehold.it/250x250/fdd" alt="">

</a> 
<a class="mouseover-thumbnail-holder">
  <img src="http://placehold.it/150x150/dfd" alt="">
  <img class="large-thumbnail-style" src="http://placehold.it/250x250/dfd" alt="">
</a>

Code:
a.mouseover-thumbnail-holder {
  position:relative;
  display:block;
  float:left;
  margin-right:10px;
}
.large-thumbnail-style {
  display:block;
  border:10px solid #fff;
  box-shadow:0px 0px 5px #aaa;
}
a.mouseover-thumbnail-holder .large-thumbnail-style {
  position:absolute;
  top:0;
  left:-9999px;
  z-index:1;
  opacity: 0;
  transition: opacity .5s ease-in-out;
  -moz-transition: opacity .5s ease-in-out;
  -webkit-transition: opacity .5s ease-in-out;
}
a.mouseover-thumbnail-holder:hover .large-thumbnail-style {
  top:0;
  left:105%;
  z-index:1;
  opacity:1;
}
what do you say. I guess that i can apply this

Last edited by sayhello_to_the_world; 07-16-2013 at 04:45 PM.
 
Old 07-17-2013, 02:58 AM   #6
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
You can certainly apply that. If you are working with "position:absolute" you should test with InternetExplorer in general because IE often shows strange behaviours in this respect.

Instead of shifting the big image to the left for hiding it (position:absolute;left:-9999) you could set display:none for this and on hover display:block. But I don't know which version performs better.

Regards
J
 
Old 07-18-2013, 02:06 AM   #7
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 229

Original Poster
Rep: Reputation: Disabled
hello dear j-ray



many thanks for the answer - and for encouraging me.

investigated it with FireBug and saw quite alot. ;-) Note FireBug is a tremendous tool that has got many many options - on a sidenote: i need to have some kind of manual.

i saw that have to tailor the layout.css


PHP Code:
<ul id="slider37" style="position: relative; width: 400px;">
<
li style="position: absolute; top: 0px; left: 0px; visibility: visible; opacity: 1;">
<
img alt="g_one1" src="/images/stories/girls_one/m_vignette_hans-on-experience_4545166211_.jpg">
<
div class="slide-desc">
</
li>
<
li style="position: absolute; top: 0px; left: 0px; visibility: hidden; opacity: 0;">
<
li style="position: absolute; top: 0px; left: 0px; visibility: hidden; opacity: 0;">
<
img alt="gone_3" src="/images/stories/girls_one/m_vignette_gamergirls_4585918045_.jpg">
<
div class="slide-desc"
and i certainly have to tweak a html-file in the template Ja_purity_II


well i dig deeper in the use of FireBug.

will come back and report all the findings.


regards say
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Making GTK3 themes – Part 2: The gtk.css and gtk-widgets.css file LXer Syndicated Linux News 0 07-24-2012 01:50 PM
[SOLVED] fluxbox disable mouse hover popup tooltip (Firefox only ?) H_TeXMeX_H Linux - Software 3 08-23-2011 01:29 PM
CSS - Is there a way to put several lines of HTML into one line using CSS? Chronothread Programming 12 01-05-2011 06:06 AM
HTML/CSS/JS: Problem with <p> not having an absolute position with CSS. RHLinuxGUY Programming 7 03-03-2007 12:21 AM
Desktop icons dosnt have ToolTips (apear when mouse hover above desktop icon) Acidx Linux - General 1 12-03-2006 07:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration