padding

A way to find the size and location of padding in a struct?

I'm trying to write a tool that will take as input some C code containing structs. It will compile the code, then find and output the size and offset of any padding the compiler decides to add to structs within it. This is pretty straightforward to do by hand for a known struct using offsetof, sizeof, and some addition, but I can't figur...

Android - Padding in different phones

Say I add a linear layout with top padding of 20. Does it mean that the layout is rendered with 20 pixels of padding in all phones? Or does it scale according to the height/width/density of the phone? Thanks Chris ...

Padding (left, right, top, 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. <Button MinWidth="75" Padding="2" Content="It speaks!" /> Is it possible to simulate something like Padding.left/right in WPF? ...

CSS Padding of a nested table ignored by Opera

Hello, I am using a table nested in a table which happens to have the border-collapse:collapse; property. The problem is with the padding property of the nested table, which Opera seems to ignore. To reduce it to the simplest possible, with the following HTML code...: <table style="border-collapse:collapse;"> <tr> <td> ...

How come there is 4px of extra padding appearing under my <a> element?

H3LLO, For some reason there is 4px of extra padding appearing under the a element. I am seeing this manifest in both Firefox and Chrome. I remember seeing this phenomenon on Flickr in its early days except it was a blue bar that appeared under s wrapped in elements. Here is a link to the example code that illustrates my problem. The...

Indexing into arrays of arbitrary rank in C#

I need to iterate over an array of arbitrary rank. This is for both reading and writing, so GetEnumerator will not work. Array.SetValue(object, int) doesn't work on multidimensional arrays. Array.SetValue(object, params int[]) would require excessive arithmetic for iterating through the multidimensional space. It would also require dyna...

SQL Identity with leading padded zeros

I have marked a column as Identity in my table create table Identitytest( number int identity(1,001) not null, value varchar(500) ) I need the identity column to be incremented as 001,002,003, etc. The database shows that it is inserting as 1,2,3, etc. How can this be done? ...

Padding that shouldn't be there

Hi! I have a 2 column layout that I'asked about earlier (http://stackoverflow.com/questions/3423761/simple-2-column-layout). What I've noticed is that it's not the positioning of the content column on the right that's the problem, but rather it's the way the content in that column is positioned. I've been looking for a while and I can'...

Trouble padding

Hi, I have a horizontal LinearLayout. This LinearLayout has a checkbox next to another LinearLayout. The layout width/height of the checkbox is wrap_content, whereas the inner LinearLayout is fill_parent/wrap_content. The layout_weight of the inner LinearLayout is set to 1. I've tried to add some android:padding around the checkbox ...

Why does 'padding' sometimes count inside an element width, and sometimes not?

I've made a bookmarklet that, among other things, loads a form in a "popup" div. I reset every CSS tag known to mankind on every element I create, and as far as I can tell examining it in firebug, no CSS tag is "bleeding through". However, on some pages, the input width includes its padding: input.clientWidth = input.style.width on ot...

padding and margin for CSS <li> simply NOT WORKING

I am working on this site, and I have a pretty large .css document. For some reason I cant get these list items to have a padding or margin of anything other than 0px. I have no idea where it might be inheriting this from, and why me writing { margin: 5px; padding: 5px; } does nothing! Here is the site, im referring to the element...

remove extra cellspace from div with display: inline table?

This is so annoying. In firefox and Opera, i'm getting padding between my nested divs, but not in Chrome and Safari. I tried border-collapse:collapse But no luck, any ideas? This extra space is screwing up my fluid footer (all div widths add up to 100%, but because opera and FF add this space i never asked for (!) it overflows. Here's...

add space before a numbers in php

How can I add space before numbers in php, to get output like this:  9   10 100 i m using str_pad($k,3,'',STR_PAD_LEFT) but blank space is not working and i don't want leading zero but i want blank spaces ...

CSS positioning (margin / padding) with markup constraint

Hi all, I have two sibling divs sitting below each other, both contained in the same parent div. The requirement is that the divs need a certain amount of space between them, let's say 20px, but the space beween the inner divs and the parent div needs to be the same on all sides (top, right, bottom, left), in this case 0px. The constr...

textview Inset setting

Hi All ! We all know that in interfacebuilder you can set an inset to an NSTextView. But in my case I needed to create it programaticly whitch is ok but I cannot find a way to define an Inset for the text so it's always on the top left corner of my textview and as I have a background picture for this textview I would like the text to be...

Vertically aligning <div> with one <form type="text"> and 2 <span>s

Hello, I'm looking to align one of my <div> containers which has a nested <form ype="text"> and 2 <span> tags but I can't seem to apply a margin-top: 6px; to the container <div>. Would padding-top: 6px; be the answer? ...

Equal height columns with padding

Hey. I have the following markup: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title></title> <style type="text/css"> * { padding: 0; margin: 0; } #container { padding-left: 200px; ...

[VB.Net] Display `00` instead of `0` in a NumericUpDown control

Hello everyone! I'm letting users select a date/time for a scheduled task to run, using two NumericUpDowncontrols. I'd like one-digit values to be padded with a leading 0, so as to display 09:00 instead of 9:0. Any ideas? Thanks, CFP. ...

css: outrageous change in property when put inside this fieldset

My custom drop down menu has a really large change in top and bottom padding. UPDATE Javascript, CSS & HTML included in fiddle [PHP removed] First off, I didn't realise I could share a fiddle ^^ Pretty epic site. I'ma keep debugging, but thought I'd post it here to see if anyone can spot where the problem is :) ...

Extra padding on linked images (in every broswer)

Hello, I'm having a problem with getting extra padding on link element with an image inside. It happens in all browsers, Safari, Firefox, IE. I have a reset stylesheet applied so there shouldn't be any extra margins on padding but upon inspection it's clear that the a element has some extra bottom padding from nowhere. Any ideas? Her...