2

I am using Twitter's Bootstrap in an MVC 4 project, and it basically works, however the styling is off. For example, this is what a popover should look like:

enter image description here

However, the button renders incorrectly:

enter image description here

and the popover arrow is not aligned properly:

enter image description here

Any thoughts on what might be happening? Here is my .cshtml file:

<link href="@Url.Content("~/Content/bootstrap.css")" rel="stylesheet" type="text/css"/>
<script src="@Url.Content("~/Scripts/bootstrap.js")"></script>

<div class="well">  
<a href="#" id="example" class="btn btn-danger" rel="popover" data-original-title="Twitter Bootstrap Popover">hover for popover</a>  
</div>  

<script>
    $(function () {
        $("#example").popover();
    });  
</script>  

1 Answer 1

3

Found the answer.. it was due to CSS conflicts with the default Site.css file. body had a top border of 10 px, which was causing the misalignment of the popover Also, i changed <a to a <button and the button rendered correctly.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.