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

  • SEARCH
  • Home
  • 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 9136841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:00:28+00:00 2026-06-17T09:00:28+00:00

Ok guys, noob here, writing my first joomla module (or trying to anyway!). Gotten

  • 0

Ok guys, noob here, writing my first joomla module (or trying to anyway!). Gotten suprisingly far but am having some issues with my css styling, im sure its to do with my selectors and my lack of understanding about whats happening!

Basically Im trying to make one of the li’s padding-right grow on hover, the effect is working but currently both the li’s are growing rather than just the one I am hovering on.

Any help would be awesome!

THE HTML

<div>
<ul id="social">
<li>one</li>
<li>two</li>
</ul>
</div>

THE CSS

#social{
    position:fixed;
    z-index:1000;
    top:50%;
    right:0px;
    list-style:none;
        }

#social li{
    padding-right: 5px;
    padding-top:5px;
    padding-bottom:5px;
    padding-left:5px;
    background-color: #202020;
    border-radius: 4px 0 0 4px;
    margin-top:15px;
    -moz-transition: padding-right .3s ease-in;
     -o-transition: padding-right  .3s ease-in;
     -webkit-transition: padding-right  .3s ease-in;
     transition: padding-right  .3s ease-in;
    }

#social li:hover{
    padding-right: 25px;
    padding-top:5px;
    padding-bottom:5px;
    padding-left:5px;
    }
  • 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-17T09:00:29+00:00Added an answer on June 17, 2026 at 9:00 am

    I’m pretty sure this is because li is a block element, which fills it’s parent (the ul) When one grows, the parent is pushed out, causing the other li to fill the space. This way the lis will always be the same size.

    There might be a better way, but you could add the following styles to the li

    float:right;
    clear:both;
    

    This works because it changes the elements to act like inline elements, and keeps them stuck to the right side, but also puts each on a separate line.

    An alternative is to put an inline element inside of the li (span or a), and change the li styles to be a, and add an li style to simply set text-align:right. You’ll probably want some other styling, but I just did enough to get the functionality in there.

    <div>
    <ul id="social">
      <li><a href='#'>one</a></li>
      <li><a href='#'>two</a></li>
    </ul>
    </div>
    
    #social{
        position:fixed;
        z-index:1000;
        top:50%;
        right:0px;
        list-style:none;
            }
    
    #social li{
      text-align:right;
    }
    
    #social a{
        padding-right: 5px;
        padding-top:5px;
        padding-bottom:5px;
        padding-left:5px;
        background-color: #202020;
        border-radius: 4px 0 0 4px;
        margin-top:15px;
        -moz-transition: padding-right .3s ease-in;
         -o-transition: padding-right  .3s ease-in;
         -webkit-transition: padding-right  .3s ease-in;
         transition: padding-right  .3s ease-in;
        }
    
    #social a:hover{
        padding-right: 25px;
        padding-top:5px;
        padding-bottom:5px;
        padding-left:5px;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry guys, I'm a noob. I know that some languages support type casting, but
Hey guys sorry for the noob question but I am having a hard time
Guys I am trying to pass some data to my typeahead form, but for
guys sorry for being so noob but im still starting yet with my php,
guys am having some troubles with running out of memory when displaying an animation
Guys, I'm trying to convert something from C# to VB.NET and I'm having trouble
Hey guys I am still sort of a noob but today I finished up
hello guys i badly need your help, php noob here, im creating a bulletin
it's my first post in here, but you have been helping me indirectly in
Hey guys, I can only apologise for asking such a noob question, but this

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.