PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Sep 22, 2020 8:40 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Feb 25, 2013 7:19 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
Syntax: [ Download ] [ Hide ]
.menuhoverbox {
        display: none;
        margin: 1px;
        background-color: #000000;
        padding: 2px;
        font-size: 11.2px;
        position: relational;
        top: 5;
        color: #ffffff;
}

.menuhoverboxlink:hover + div {
        display: block;
}


"menuhoverbox" shows up when you hover over the text.
Right now, it just appear below the text you hover over.

How do you control it, so, for example, it would appear to the right of the <a> link, without pushing anything over?

Syntax: [ Download ] [ Hide ]
<a class='menuhoverboxlink' href='/diary/$addday/$addmth/$addyr/$row->id'>Date</a>
<div class='menuhoverbox'>Sessions active on this date $addday/$addmth/$addyr</div>


It pushes text down at the moment, so if you have one link below the other, it all jumps about - I'd like the hovered box to just appear to the right (like an Alt tag).

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Mon Feb 25, 2013 7:40 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US
First, it's "position: relative;". Second, for positioning, you can either float the block element inside a containing block, or declare the containing block "position: relative;" and then use "position: absolute;" on the blocks inside to position them.

_________________
(#10850)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group