Questions tagged [padding]

Extra space inserted into memory structures to achieve address alignment -or- extra space between the frame and the content of an HTML element -or- extra spaces or zeros when printing out values using formatting print commands like, in C, the printf*-family of functions.

Padding in memory structures is the insertion of additional bytes of unused space to make the internal fields of a structure align to desirable address boundaries.

Padding in HTML layout is extra space inserted between the content of the element and its border or frame. Padding is space added to the interior of the element; margin is space around the exterior of the element.

In arrays, padding is addition of extra 0's (zeros) in one or more dimension of the array in a symmetric, circular or replicating manner. This is important for signal and image processing, in the context of and convolution.

3939 questions
26
votes
2 answers

PHP: How to add leading zeros/zero padding to float via sprintf()?

I'm using sprintf() to get a formatted string of some float numbers with a certain precision. In addition, I wanted to add leading zeros to make all numbers even in length. Doing that for integers is pretty straight forward: sprintf('%02d',…
Hirnhamster
  • 7,101
  • 8
  • 43
  • 73
25
votes
5 answers

How can I add padding to a textarea without causing the width to increase?

I've been having trouble setting a textarea element's width and using padding via CSS. The padding value seems to change the width of the textarea, which I'd rather it not do. This is my HTML code:
木川 炎星
  • 3,893
  • 13
  • 42
  • 51
25
votes
3 answers

Does changing the background also change the padding of a LinearLayout?

I have the following LinearLayout. What I don't understand is if I set the background to another image, the padding information are reset. Is there a way to prevent this?
michael
  • 106,540
  • 116
  • 246
  • 346
25
votes
2 answers

Where to find the twitter bootstrap less files?

I'm trying to find a relatively easy way of adding padding to my containers with Twitter Bootstrap. All works well but at some resolutions, the window doesn't fit the screen. I figure I have to go and compensate for the padding by removing some of…
onjegolders
  • 1,049
  • 5
  • 22
  • 35
24
votes
1 answer

how to set inner text margin of button

I have a WPF button with some text in it. If I don't set button's width manually, then the button width will be almost of text's width, and it doesn't look very good. I don't want to calculate the width of each button. Is there a more convenient way…
Bogdan Verbenets
  • 25,686
  • 13
  • 66
  • 119
24
votes
2 answers

Trying to understand margins in LinearLayout inside a ScrollView

I need to have a LinearLayout inside a SrollView and that LinearLayout must have a margin from the ScrollView. At first, the only way I could think of to solve that issue was having a LinearLayout inside another LinearLayout with the margins set on…
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
24
votes
7 answers

Remove 3 pixels in iOS/WebKit textarea

I'm trying to create a textarea that looks exactly like a div. However, on iOS there's 3 pixels coming from somewhere that I can't remove. Here's my code: Textarea test