When you are deeply involved in graphics editing, at some point you will need specially-sized images, such as: specified megapixels while having a fixed 4:3, 3:2 or other w/h ratio width and/or height to be multiple of 2, 4, 8, 16, etc. at a given w/h ratio calculate the other side, knowing one side and […]
MySQL: Select field, replace text from another table
I have two tables, “products” and “brands”. In the “products” table, the product’s name is in the “name” field. The product’s brand is represented by the # (diez) character. To know which is the brand, there’s a “brand_id” field. So far we have: products table: id: int name: varchar brand_id: int brands table: id: int […]
CSS: Inline images down by 1px
Not a big problem, but catches my eyes and at some point looks unprofessional… Scenario: <p><img src=”icon.png” /> Some text</p> When looking at the rendered page, the image is down by 1px, relative to text. Although the img tag is pre-formatted in CSS to appear vertically centered to the text, it’s appearance is still wrong. […]