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>
Link to comment
https://forums.phpfreaks.com/topic/293157-span-overlap/
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
https://forums.phpfreaks.com/topic/293157-span-overlap/#findComment-1503106
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.