Jump to content

span overlap


Destramic

Recommended Posts

hey guys i have like 4 spans which show at the bottom right hand side of my page which are currently overlapping...i've tried to display as block but no success. any help would be greatful...thank you

 

live demo: http://jsfiddle.net/sr5fta4m/

 

here is my code:


.notification {
	padding: 15px;
	margin-bottom: 20px;	
	border: 1px solid #eed3d7;
	border-radius: 4px;
	position: absolute;
	bottom: 0px;
	right: 21px;
	float: right; 
	clear: right;
	diplay: block;
}

#alert-notification
{
  color: white;
  background-color: #DA4453;
}

#success-notification
{
  color: white;
  background-color: #37BC9B;
}
#information-notification {
  color: white;
  background-color: #4A89DC;
}
#error-notification {
  color: white;
  background-color: #DA4453;
}

<span class="notification" id="success-notification">Registration complete. Please check your mail.</span>
<span class="notification" id="alert-notification">Account already activated.</span>
<span class="notification" id="information-notification">Please check you email.</span>
<span class="notification" id="error-notification">Wrong login detials.</span>
Edited by Destramic
Link to comment
Share on other sites

  • 4 weeks later...

youve positioned all four elements in the same place absolutely, relative to their container.

.notification {
...
    position: absolute;
    bottom: 0px;
    right: 21px;
...
}

i could help you if you explained what it is youre trying to achieve.  otherwise im only guessing.  but you could try soemthing more like this:

<style type='text/css'>
        #container {
            position: absolute;
            bottom: 0px;
            right: 21px;
        }
        
        .notification {
            padding: 15px;
            margin-bottom: 20px;    
            border: 1px solid #eed3d7;
            border-radius: 4px;
            float: right;
            display: block;
        }
        
        #alert-notification
        {
          color: white;
          background-color: #DA4453;
        }
        
        #success-notification
        {
          color: white;
          background-color: #37BC9B;
        }
        #information-notification {
          color: white;
          background-color: #4A89DC;
        }
        #error-notification {
          color: white;
          background-color: #DA4453;
        }
    </style>

    <div id='container'>
        <span class="notification" id="success-notification">Registration complete. Please check your mail.</span>
        <span class="notification" id="alert-notification">Account already activated.</span>
        <span class="notification" id="information-notification">Please check you email.</span>
        <span class="notification" id="error-notification">Wrong login detials.</span>
    </div>
Link to comment
Share on other sites

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.