Positioning DIV to the center of Browser Viewport Sometimes I write some JS code to prepare my HTML mockups. In this post I am describing the step-by-step approach on how to position a DIV to the center of browser's viewport. Case Assume that you have a DIV and you want to show it upon clicking a link or button. And that DIV must appear exactly on the center of the browser's window. Technically browser's display area is called "View Port". So our aim is to display a DIV to the center (origin) of the view port. How to do this? 1. Create the DIV. 2. Specify CSS properties 3. Write a few lines of Javascript code to position the DIV 4. Insert an action "onClick" to a button or link in the HTML. Step 1 Write the HTML code for the UI and enclose the code chunk with a DIV. Specify some valid ID for the DIV. For example "AddUserDialog". Step 2 A DIV element, by default will be displayed inline. A dialog box or some other "windowed" UI require...
UPS is a must have accessory for every computers in India. Sudden power failures and surge in supply are common everywhere. To protect valuable data from getting corrupted, it is a must to buy a good UPS. Before we go into the topic, it is essential to understand the types of UPS. What are the types of UPS available? For consumer use, 3 types of UPS - Online, Off-line (stand by) and Line-interactive UPS are available. Online UPS: To explain in simple terms, this UPS supplies AC power to your computer which is converted from the power produced by the battery connected to it. The battery is constantly re-charged by a AC-DC convertor on the other end. Offline UPS: When the mains supply is on, the UPS will pass thru the mains supply to the computer. If mains is cut, it will use a DC-AC convertor and produce power from the attached battery. Line Interactive UPS: Uses a combination of invertor/convertor circuit. When the mains is on, it recharges the battery and produces power ...
Sometimes you find it difficult to decide upon which Icon to use for certain metaphors? That's the case most UI designers stumble upon. Anyway, here is a couple of tips to help you. Preferences and Settings have the same meaning. So you can use the same metaphor for both actions. Generally the Hammer+ScrewDriver or Spanner+ScrewDriver icon is used for settings. You can create crisp looking icons from 24x24 onwards. 16x16 and less will not help you to create a clean looking icon. In some cases, a pixel drawing at 16x16 size could help you. Or else, use the "Equalizer" as metaphor, which is somewhat generic and commonly found in everyday life. For "Edit" action, go for the "Pen/Pencil" metaphor. Depending upon the availability of pixel area, you can either show a paper or alphabets beneath the pen/pencil. This will enhance the metaphor. Hope this helps! :-) - Rajesh Sundaram
Comments