Reputation: 14370
I have a Div like this
<div align="center">
<p style="color: black; font-size: 10px;"><b>Summary</b></p>
</div>
And when i use this div the it shows me summary but with added padding on both top and bottom when i use it in jquery mobile.. How to remove this padding?
Upvotes: 2
Views: 10336
Reputation: 4676
If you are using the content UI element and any div that is dynamically sized, the automatic margins are generated by the content tag in jQuery mobile. Add this to your CSS:
.ui-content {
margin: 0; padding: 0;
}
Upvotes: 2
Reputation: 1370
You have multiple ways to disable the padding in a div. first one is to define the element style
<div style="padding: 0;">...</div>
second one (and much prettier) is to define an ID in your div like
<div id="myID">...</div>
and set in your css the padding values to zero like this:
#myID{ padding:0; }
If it isn't padding, you can try margin: 0;
too.
Most of html elements have by default margin and padding. to disable this put the following part on top of your .css file:
*{
margin: 0;
padding: 0;
}
Upvotes: 8