So I have recently come across `string.Format("{0, x}", "Word")` for aligning strings, with demonstration code that works fine in the CMD. Does this also function correctly when pumping text to a label? I am finding that it does not behave as expected and instead misaligns the text. Using an example I nicked off a site Console.WriteLine("-------------------------------"); Console.WriteLine("First Name | Last Name | Age"); Console.WriteLine("-------------------------------"); Console.WriteLine(String.Format("{0,-10} | {1,-10} | {2,5}", "Bill", "Gates", 51)); Console.WriteLine(String.Format("{0,-10} | {1,-10} | {2,5}", "Edna", "Parker", 114)); Console.WriteLine(String.Format("{0,-10} | {1,-10} | {2,5}", "Johnny", "Depp", 44)); Console.WriteLine("-------------------------------"); Is shown to work fine in console however if you look …

Member Avatar
Member Avatar
+0 forum 5

Hello everyone im trying to make a website for movies so its pretty simple with movie boxes but the poblem is i dont want to do it like every single movie i add i need to write a new code in `index.html` so is there a way to skip this part of coding and make it eazy padding on every movie so to have 10px distance between the boxes... Here is my [Website](http://www.secretchatsk.host56.com) you can see it what im trying to say. Thank you all :)

Member Avatar
Member Avatar
+0 forum 4

Hi all thanks for reading, I am having problems getting my padding to work how i would like. I have a the followinc code for my page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Sonc Hydro</title> <link rel="stylesheet" type="text/css" href="css/main_styles.css" /> <link rel="stylesheet" type="text/css" href="css/main_layout.css" /> </head> <body bgcolor="#08a2c0"> <div id="container"> <div id="body"> <div id="header"> <h4>sonic hydro</h4> </div> <div id="nav"> <h4>navigation</h4> </div> <div id="body_main"> <div class="body_panel"> <h4>main body</h4> </div> <div class="body_panel"> <h4>main body 2</h4> </div> <div class="body_panel"> <h4>main body 3</h4> </div> <br /> <div class="body_panel"> <h4> main body 4</h4> </div> <div …

Member Avatar
Member Avatar
+0 forum 3

what is the difference between margin & padding ? wy we use them ?

Member Avatar
Member Avatar
+0 forum 5

Take the following C structure: typedef struct dataPoint { tick * tickData; struct dataPoint * previousDataPoint; struct dataPoint * nextDataPoint; } dataPoint; Compiling on a 64-bit system with 8-byte words, this structure takes up 24 bytes (3 words) of memory. 24 % 8 = 0 ... so it is word aligned, yet for each structure created, it uses 4 words, why is this? I am aware padding and alignment is done for performance reasons, but does anyone know the specific reason for this case, as it is already word aligned, perhaps CPU cache line boundaries?

Member Avatar
Member Avatar
+0 forum 9

Hello, I am having an issue with my footer in IE 8. IE is increasing the padding, and bumping the newsletter sign up box down, when it is supposed to be on the same level as the links. Any thoughts as how to fix the padding problems? Site can be seen here: [Click Here](http://ushousingco.com/index.htm)

Member Avatar
Member Avatar
+0 forum 4

I am having an issue with the actual height of the main site navigation. It is not up against the main header image as it should be. The url to view the problem is: [Click Here](http://psychhealth.net/) I would greatly appreciate any help looking into this, thanks!

Member Avatar
Member Avatar
+0 forum 4

i have to decrypt a frame on my server. encrypted frame is coming from client device through GPRS on socket.encryption is done with "TripleDes" and with a given key.same algorithm and key i am using n server side. frame is a combination of Hex and Ascii String. problem is when i decrypt this frame i get an error : javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher and when i pad my byte array with zeros i get an error : javax.crypto.BadPaddingException: Given final block not properly padded following is my code : byte[] key …

Member Avatar
Member Avatar
+0 forum 2

To illustrate the issue, I've created two HTML pages: [url]http://www.johnnycho.com/firefox_csstest01.html[/url] [url]http://www.johnnycho.com/firefox_csstest02.html[/url] They are both exactly the same, with one exception. On the first page, the div class="topbox" has a padding of 1px. On the second page, the padding has been set to 0. If you look at these two pages in Firefox 3.5+ on Mac and Windows (including Firefox 5), you'll see that div class="topbox" on the second page suddenly has the same top margin as the div class="bottombox" even though div class="topbox" is specified a top margin of 0. In fact, when I change the top margin of "bottombox" …

Member Avatar
Member Avatar
+0 forum 5

Hey.. I have a problem with my CSS, let me show you.. CSS [CODE].wrap { font-size:12px; width:980px; margin:auto; } .left_wrapper { height:auto; float:left; width:20%; background:#699; } .right_wrapper { height:auto; float:right; width:79.7%; border-color:#b7b6b6; border-top-width:0px; background:#993; }[/CODE] HTML [CODE]<div class="wrap"> <div class="left_wrapper"> blah blah </div> <div class="right_wrapper"> blah blah </div> </div>[/CODE] Now, works all fine and this is the output i want [img]http://i1104.photobucket.com/albums/h333/Clarkey4/903cf051.png[/img] But, if I add ANY padding to left_wrapper in the css, this happens.. [img]http://i1104.photobucket.com/albums/h333/Clarkey4/2eb02c27.png[/img] any guidance will be appreciated :)

Member Avatar
Member Avatar
+0 forum 2

Hello! This is my first post and I would like to say hello! I am working on a web page and I would like to know if it IS possible to have images added to the padding aspect of the page. For instance, let's say I have a page that is 800px. Okay, I have 100px and 100px on the right and left side. Now, let's say I want to integrate images (as a background) ONLYY within the padding. Is this possible? I am including an image to illustrate my question. The images would need to be in the black …

Member Avatar
Member Avatar
+0 forum 2

Hi I have a problem with RSA encryption/decription of txt files, I have one method to create a pair of RSA keys and save them into a file, then i made two methods, one for encryt and one for decrypt, encrypt method works fine, but when I want to decrypt it shows this exception javax.crypto.BadPaddingException: Data must start with zero, any help would be very apreciated. Heres the code for create the RSA keypair into a file: [CODE]public void generateKeys() throws NoSuchAlgorithmException, NoSuchProviderException, FileNotFoundException, IOException{ int keysize = 1024; KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN"); keyGen.initialize(keysize, random); …

Member Avatar
+0 forum 0

Hello all, I'm trying to make a webpage that has about 200px padding on the left and right side and 0 padding at the top and bottom, i would like my content to be viewed in that small area. I'm wanting the background color where my content will be to be grey but i want the padded sides to stay white. Is this possible? Like this [url]http://www.cssbasics.com/[/url], you see how the sides are grey and the content area is in a different color, how can i do this? Thank you!

Member Avatar
Member Avatar
+0 forum 4

Hey, I have a table on my site in which I want to <th> to have a background-color of black and the <td> to have a background-color of grey. Also to have a border at the bottom of the cell and none on the top of sides. Now I have managed to get this to work but there seems to be a margin on the right that is causing the last 3/4 pixels or so to be grey in the <th> and the bottom border to be slightly longer (again 3/4px) than the rest. Here is my HTML table code: …

Member Avatar
Member Avatar
+0 forum 1

Hey, So, I have a class that has a bunch of info, the usual set/get methods. But my question is, I'm adding them all together in another method, and I don't know how you get it all in a nice table like format, with all the columns/rows being equal and what not... So, I have first name, last name, social security number, and when I print this out, it's like so: Bob Parly: SSN#: 123-45-6789 Anthony Frenkstene: SSN#: 987-65-4321 So, see how it is not aligned at all? So, how can I get it to push the SSN# column out, …

Member Avatar
Member Avatar
+0 forum 1

The footer on my website is raised 1 pixel too high. #footer { clear: both; margin-left:0%; height:40px; font-size: .8em; width:100%; border-top: 1px solid #81C5A0; background-color:#FFFFFF; z-index:1; margin:0; Padding:0;

Member Avatar
Member Avatar
+0 forum 8

Hello, I'm trying to do a margin-left depending on the resolution of the screen... I want to margin the page to hold it in the center all... like daniweb... you can see that all is centered, but then you can move things to the left and right like logo and adds... I think that I could do this with a div, and then put all inside and put it centre and it will be centre depending on resolution, am I right ???

Member Avatar
Member Avatar
+0 forum 5

The End.