html - How to make a div that overflows parent div horizontally -


i want make message stackoverflow informing can't vote in own questions.

like this

inspecting html of message div, overflows of it's parents. how can achieve bootstrap parent col div?

edit: in addition provided answer, had use white-space: nowrap; because text inside message kept wraping parent's width

you can use same stackoverflow:

html

<div class="message message-error message-dismissable">   <div class="message-inner">   <div title="close message (or hit esc)" class="message-close">×</div>     <div class="message-text" style="padding-right: 35px;">     can't vote own post     </div>   </div> </div> 

css

z-index: 1; display: none; color: #fff; background-color: #c04848; text-align: left; box-shadow: 0 2px 5px rgba(0,0,0,0.3); position: absolute; 

jquery

and own jquery, because guess not doing own stackoverflow right?

$(document).ready(function(){   $('.upvote').click(function() {      $.get('/checkownvote', {        user_id:     session.user_id,        question_id: session.question_id      },      function(data) {        if(data.is_own_question)          $(this).closest('.message-error').show();        else          $(this).text(parseint($(this).text)++);     });     return false; // prevent default   }); }); 

sorry, have no time on jsfiddle, maybe later :)


Popular posts from this blog