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
38
votes
5 answers

Pad a number with starting zero in .Net

I have a requirement to pad all single digits numbers with a starting zero. Can some one please suggest the best method? (ex 1 -> 01, 2 -> 02, etc)
Alex
  • 39,265
  • 21
  • 45
  • 42
37
votes
5 answers

Can C arrays contain padding in between elements?

I heard a rumor that, in C, arrays that are contained inside structs may have padding added in between elements of the array. Now obviously, the amount of padding could not vary between any pair of elements or calculating the next element in an…
E.M.
  • 4,498
  • 2
  • 23
  • 30
36
votes
2 answers

Prevent padding from making an element bigger?

I have an element with a 70% width, and it is floating beside another element with 30% width. However, when I add 25px of padding, the element expands and breaks the format. Is there any way to make padding increase the contents' distance from the…
nkcmr
  • 10,690
  • 25
  • 63
  • 84
35
votes
7 answers

Flutter how do I remove unwanted padding from Text widget?

I have a Text widget and not sure why it seems to just have padding at the top and bottom even though I didn't set any in the code. This is from the default Flutter app, I just modified the font size. body: Center( child: Column( …
Hasen
  • 11,710
  • 23
  • 77
  • 135
35
votes
15 answers

How to remember in CSS that margin is outside the border, and padding inside

I don't edit CSS very often, and almost every time I need to go and google the CSS box model to check whether padding is inside the border and margin outside, or vice versa. (Just checked again and padding is inside). Does anyone have a good way of…
Hamish Downer
  • 16,603
  • 16
  • 90
  • 84
35
votes
8 answers

Why does the HTML5 DOCTYPE mess with my padding?

I have an html5 page with a navbar. Completely scratch coded. I just recently added a doctype to the item, and now I’m getting extra space under my navbar. If I remove the doctype declaration, it goes back to normal. I have completely reset padding,…
Dakota
  • 2,915
  • 2
  • 28
  • 25
35
votes
8 answers

Google Maps API 3 fitBounds padding - ensure markers are not obscured by overlaid controls

I'd like to be able add padding to a map view after calling a map.fitBounds(), so all markers can be visible regardless of map controls or things like sliding panels that would cover markers when opened. Leaftlet has an option to add padding to…
jsurf
  • 575
  • 1
  • 8
  • 20
34
votes
2 answers

How to add padding top of the ListView.builder in Flutter?

Mostly I use ListView and ListView.builder in my Flutter project. And mostly I use build widget body part to place the ListView or ListView.builder. I look at Flutter documentation and didn't fine any info or example. Here is a basic ListView…
Nick
  • 4,163
  • 13
  • 38
  • 63
34
votes
6 answers

Textbox padding

I've searched through the internet, I must be using the wrong keywords because I can't find anything. I want to create a textbox that has text starting from a little far from the left. Just like that.
dab
  • 817
  • 1
  • 12
  • 23
34
votes
6 answers

Bootstrap Spacing classes not working

I am trying to add spacing to my div/ul as shown in Bootstrap Utilities Documents. But it's not working at all and I couldn't even trace the class in Firebug. http://v4-alpha.getbootstrap.com/components/utilities/#spacing My HTML Code
TTCG
  • 8,805
  • 31
  • 93
  • 141
34
votes
2 answers

Padding (left, top, right, bottom) in WPF

What I want to have is a button with a bit of left and right padding. I can set the MinWidth to some val, but if the Content will be changed it may not be enough.
Lukasz Madon
  • 14,664
  • 14
  • 64
  • 108
34
votes
1 answer

Padding-top not working

Why doesn't padding-top work? The height of the div is set. HTML: CSS: .menu { width: 300px; height: 30px; …
Mantas Kudeikis
  • 489
  • 2
  • 7
  • 16
34
votes
2 answers

What are the cipher padding strings in java

Everyone talks about the padding schemes in ciphers but what are the actual strings one needs to pass in to the cipher? I don't care if they are symmetric or asymmetric, I just want a list of the possible values.
Roy Hinkley
  • 10,111
  • 21
  • 80
  • 120
32
votes
9 answers

Removing TextInputLayout extra top padding

TextInputLayout seems to always have some extra padding at the top (no matter that all margins/paddings are set to 0): The layout looks like:
0leg
  • 13,464
  • 16
  • 70
  • 94
32
votes
7 answers

Right padding with zeros in Java

Sorry if this question was made already, I've made a deep search and nothing. Now, I know that: String.format("%05d", price); Will be padding my price with zeros to the left, so a price of 25 will result in 00025 What if I want to pad them to the…
Caina Santos
  • 919
  • 1
  • 9
  • 16