Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7737367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:58:43+00:00 2026-06-01T07:58:43+00:00

I have the code: <div class=’selectAnAction’> <ul> <li class=’actionSelect’><span>Select an Action</span></li> <li class=’action’ onclick=’location.href=\/post.php?key=.$row[‘hash’].\;’>post</li>

  • 0

I have the code:

<div class='selectAnAction'>
   <ul>
      <li class='actionSelect'><span>Select an Action</span></li>
      <li class='action' onclick='location.href=\"/post.php?key=".$row['hash']."\";'>post</li>
      <li class='action' onclick='location.href=\"/adpreview.php?key=".$row['hash']."\";'>preview</li>
      <li class='action' onclick='location.href=\"/adupdate.php?key=".$row['hash']."\";'>edit</li>
      <li class='action' onclick='location.href=\"/addelete.php?key=".$row['hash']."\";'>archive</li>
   </ul>
</div>

And I have this CSS:

.selectAnAction ul { 
    display: block;
    background-image: url("/images/selectAnAction-dropdown.png");
    background-position: 0px -200px;
    background-repeat: repeat-x;
    border: 1px solid #FFFFFF;
    box-shadow: 0px 0px 3px #CCCCCC;
    font-size: 0.75em;
    list-style: none outside none;
    margin: 0px;
    overflow: hidden;
    padding: 0px;
    text-indent: 0px;
    width: 120px;
    color:white;
}
ul { 
display: block;
}
.selectAnAction ul li.actionSelect { 
background: url("/images/selectAnAction-bg.png") repeat-x transparent;
font-weight: bold;
 }
.selectAnAction ul li:first-child { 
display: block;
 }

.selectAnAction ul li { 
display: none;
margin: 0px;
text-indent: 0px;
width: 120px;
background-color:grey;
}
.selectAnAction:hover  ul li{
display: block;
margin: 0px;
text-indent: 0px;
width: 120px;
}
.selectAnAction ul { 
font-size: 0.75em;
list-style: none outside none;
}

.selectAnAction ul li { 
display: none;
margin: 0px;
text-indent: 0px;
width: 100%;
padding-left:10px;
font-family:"Times New Roman",Georgia,Serif;
font-size:1.3em;
text-align:left;
}

.action:hover {
    background-color:black;
    cursor:pointer;
}

What I get is an action menu.
First I see only the LI “select option”.
On mouse over – it shows other options (post, edit, archive etc)

I have many such menus on the page.

I want to fix the position of .action elements so that they don’t influence the design of rest of the site (because right now when they become visible – other elements of the site move as well).

So I was trying to add something like:

.action {
    position:absolute;
}

But what happens is all the .action elements show up on top of each other – right after the first LI (.actionSelect).

So now I’m trying to make them show not on top of each other, but one after another, but with position absolute.
Is there any good way to do that?
(m.b. someting like top:+20px;)

Position: relative does not work – in this way when .action elements become visible – they will move all other elements.
Can’t use hard absolute positioning too (top:100px) as I have many of these lists on the page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:58:44+00:00Added an answer on June 1, 2026 at 7:58 am

    You want to position the ul absolutely, and then move the action select outside of the ul as the parent element. If you want to keep the select in a ul, you should have a nested ul for the options. Be sure to add position:relative to whatever is the parent of the options list.

    <div class='selectAnAction'>
       <ul>
         <li class='actionSelect'>
             <span>Select an Action</span></li>
             <ul class="optionMenu">
                <li class='action' onclick='location.href=\"/post.php?key=".$row['hash']."\";'>post</li>
                <li class='action' onclick='location.href=\"/adpreview.php?key=".$row['hash']."\";'>preview</li>
                <li class='action' onclick='location.href=\"/adupdate.php?key=".$row['hash']."\";'>edit</li>
                <li class='action' onclick='location.href=\"/addelete.php?key=".$row['hash']."\";'>archive</li>
             </ul>
         </li>
       </ul>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div>
Suppose I have the following html: This a test of <code>some code</code>. <div class='highlight'>
I have some code: - count = 0 - @clients.each do |client| %div{:class =>
I have this code: <div class = content-dir-item> <p>Text input</p> <img src=./images/email.png class =
So I have this code: jQuery('div[class=someClass] :input:not(:button)').each(function() { if (input type is drop-down) {
Hi I have this HTML code <th scope=col class= style=width: 13px;> <div class=some-handle></div> <a
I have this code : $.ajax({ type: POST, url: tosql.php, data: { content, content
I have this code: <div class=window-compl> <div class=window showincatalog showing> <h2>Text1</h2> </div> <div class=window>
I have this code that I want to insert a div clear class the
I have this code, and I want on click on div with favoriteButton class,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.