Search Results

Search found 2 results on 1 pages for 'woodbase'.

Page 1/1 | 1 

  • CSS–margin or padding

    - by woodbase
    I was beginning the implementation of a new design, and once again I found that my margin property on a div-tag, did not behave as I expected. So I decided to look for best practice when it comes to using margin or padding. What I found was this very short and concise description of the difference between the two: “Margin is on the outside of block elements while padding is on the inside. Use margin to separate the block from things outside it, padding to move the contents away from the edges of the block.” So what is best practice? Well it depends on the context. In my case I should have used padding…

    Read the article

  • IPhone track title

    - by woodbase
    If you have an IPhone, you probably know that the name in the playlist comes from the “Title”-attribute instead of the filename. Usually that is not a problem. But when I plug my IPhone to the car stereo the tracks are sorted alphabetically by the “title”-attribute. That becomes a problem when You have an e-book where each chapter starts with “Track 01”. You can manually update this in the file properties (from the context menu in Windows Explorer), but doing so for +200 tracks – no thank you :) The FileInfo-class does not contain a property for this special audio file attribute. However the problem is easily solved using TagLib. The method below, not optimized in any way - just solving the problem at hand, will set the “title”-attribute to the file name. private static void UpdateTitleAttr(string dirPath, string fileFilter)         {             var files = System.IO.Directory.GetFiles(dirPath, fileFilter);                         foreach (var file in files)             {                 var f = TagLib.File.Create(file);                 var newTitle = f.Name.Substring(f.Name.LastIndexOf(@"\") + 1);                 f.Tag.Title = newTitle;                 f.Save();                }         } So now I can hear e-books while driving :P

    Read the article

1