CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 1st, 2012, 08:22 AM
wama_mms wama_mms is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 37 wama_mms User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 27 m 40 sec
Reputation Power: 2
problem in margins

hello I have a CSS code as following
Code:
span.dropt {border-bottom: thin dotted; text-align:center;}
span.dropt:hover {text-decoration: none; background: #ffffff;}

span.dropt span {position: absolute; left: -9999px;
  margin: 0px 0 0 0px; padding: 3px 3px 3px 3px;
  border-style:solid; border-color:black; border-width:1px; z-index: 6; width:80px;}
  
span.dropt:hover span {left: 2%; background: #ffffff;} 
span.dropt span {position: absolute; left: -9999px;
  margin: 4px 0 0 0px; padding: 3px 3px 3px 3px; 
  border-style:solid; border-color:black; border-width:1px;}
span.dropt:hover span {margin: 20px auto auto 240px; background: #3CF;} 


and html code
[HTML]<span class="dropt" title="">formal description<span><b>Protein</b><br/><a href="#">more..</a> </span></span>test !!!

<span class="dropt"><cons sem="protein">Mybbp1a</cons><span><b>Protein</b><br/><a href="#">more..</a></span></span>[/HTML]

when I click at the second word the margin still static and appears at the first word as the following pictures:
the first pic. when I mouse over the first word

and this pic. when I mouse over the other word

I want when I mouse over any word the subset list appear under it
thanks

Reply With Quote
  #2  
Old January 25th, 2013, 10:37 AM
webmom webmom is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 1 webmom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 25 sec
Reputation Power: 0
CSS Margins for Pop-Up

Did you ever solve this problem of having the pop-up under the triggering link?

Reply With Quote
  #3  
Old January 29th, 2013, 01:54 AM
khayhurst khayhurst is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 10 khayhurst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 16 m 38 sec
Reputation Power: 0
You have to separate the tag style

You are setting the "span.dropt span" and "span.dropt:hover span" styles twice which will not work. You have to name them separately.

CSS

PHP Code:
 span.dropt 
{
    
border-bottomthin dottedtext-align:center;
}
span.dropt:hover 
{
    
text-decorationnonebackground#ffffff;
}

#firstClass span 
{
    
positionabsolute
    
left: -9999px;
  
margin0px 0 0 0px;
    
padding3px 3px 3px 3px;
  
border-style:solid;
    
border-color:black
    
border-width:1px
    
z-index6
    
width:80px;
}
  
#firstClass:hover span 
{
    
left2%;
    
background#ffffff;


#secondClass span 
{
    
positionabsolute;
    
left: -9999px;
  
margin4px 0 0 0px;
    
padding3px 3px 3px 3px
  
border-style:solid;
    
border-color:black
    
border-width:1px;
}

#secondClass:hover span 
{
    
margin20px auto auto 240px;
    
background#3CF;
    
left2%;



HTML

PHP Code:
<span class="dropt" id="firstClass" title="">
    
formal description
    
<span>
      <
b>Protein</b>
      <
br/>
      <
a href="#">more..</a
    </
span>
  </
span>
  
test !!!

  <
span class="dropt" id="secondClass">
    <
cons sem="protein">Mybbp1a</cons>
    <
span>
      <
b>Protein</b>
      <
br/>
      <
a href="#">more..</a>
    </
span>
  </
span


P.S. you should format your code so others can easily read it.

Goodluck!

Last edited by khayhurst : January 29th, 2013 at 01:56 AM. Reason: which tags are best for HTML?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > problem in margins

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap