Better method to convert pixels to ems

Don't know if my Dreamweaver CS5 can help me do this:
I'm experimenting with making my site more accessible for vision-impaired people by using ems in my CSS style sheet for image sizes as described at http://sperling.com/examples/zoom/
The problem I have is calculating the ems. I have to open the image in Photoshop, use Image Size to figure what the height and width pixels would be at a slightly smaller size, then go to an online site that lets me convert pixels to ems. What a hassle. Shorter path?
- Keith Purtell

First you must establish the base font-size in your CSS like so:  This assumes 1em = 100% = 16px (standard browser default).
html {font-size: 100%}
body {font-size: 1em}
Then define your page layout and division widths in ems using the following formula:
1 divided by 16 = 0.0625
multiplied by the number of pixels required
= value in ems.
0.0625 X 900px = 56.25em
0.0625 X 300px = 18.75em
0.0625 X 150px = 9.375em
#wrapper { width: 56.25em}
#divName {width: 18.75em}
#divName img {width: 9.375em; height: 9.375em}
IMPORTANT!  If you don't wrap elastic images inside elastic containers, your page will fall apart when people increase text size in browser.
You can see a working DEMO of this method here:
http://alt-web.com/TEST/Resizable-ems-test.html
Good luck,
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media  Specialists
http://alt-web.com/
http://twitter.com/altweb

Similar Messages

  • After saving a pdf as Excel workbook the numbers remain text and cannot be used in calculations. Is there a better way to convert into real digital numbers?

    After saving a pdf as Excel workbook the numbers remain text and cannot be used in calculations. Is there a better way to convert into real digital numbers?
    I have tried to convert the pdf to Word instead but same difficulty with numbers: look like numbers but not usable for calculations

    Excel has a 'text to numbers' function, I would use that.
    Convert text to numbers. Microsoft Excel.

  • Anybody know of a method to convert a timestamp to a Nanosec equivalent?

    Does anybody know of a method to convert a timestamp object to a nanosecond equivalent since 1970?
    Thanks

    By a timestamp object you mean an instance of the class java.sql.Timestamp, right? Then the following will give you the nanoseconds:
    long nanos = stamp.getTime()*1000000 + stamp.getNanos();

  • I want to transfer my iPhoto from my old MacBook Pro to my new MacBook Pro. I have a firewire or I could also do it from my TimeCapsule. Would one be a better method than the other?

    I want to transfer my iPhoto from my old MacBook Pro to my new MacBook Pro. I have a firewire or I could also do it from my TimeCapsule. Would one be a better method than the other?

    Hi brotherbrown,
    A direct FireWire transfer (especially if it's 800 to 800) is going to be the fastest method. TimeCapsule would work, if you connect to it via Ethernet, via wireless it would be quite slow (especially if you have a large library).

  • Better method of coding.

    In my program i have to take the name of the first record and store it in a variable.I am using this value down in my program. I am simulating the scenario with an
    example
    declare
    vname emp.ename%type;
    begin
    select * from
    (select ename into vname from emp where deptno in(10,20) and rownum =1)
    dbms_output.put_line (vname);
    end;
    ERROR at line 6:
    ORA-06550: line 5, column 15:
    PL/SQL: ORA-01744: inappropriate INTO
    ORA-06550: line 4, column 1:
    PL/SQL: SQL Statement ignored
    So i modified the code like this..
    declare
    vname emp.ename%type;
    begin
    for emprec in(select * from
    (select ename from emp where deptno in(10,20) and rownum =1))
    loop
    vname:=emprec.ename;
    end loop;
    dbms_output.put_line (vname);
    end;
    Is there any better method of doing this?

    declare
    vname emp.ename%type;
    begin
    select ename into vname from emp where deptno in(10,20) and rownum =1;
    dbms_output.put_line (vname);
    end;

  • Error -107439611​3 Convert Pixel To Real World During Camera Feed

    Hello,
    I am fairly new to LabView and am encountering an error that I can't seem to solve.
    I am utilizing an image feed from a firewire camera to detect the real world location of a white line.  I have modified a tested, existing VI that processes the stream into individual image files, which I then pass to the VIs I wrote.
    Using the NI Vision Assistant, I created a script that extracts a color plane and processes the image to a binary image, where "off" is blank space and "on" is the line I am trying to find.  I then pass this image onto another VI, where I am encountering the error "Error -1074396113 occurred at IMAQ Convert Pixel To Real World.  The source/input image has not been calibrated" when I attempt to convert the binary image into real world coordinates using the "convert pixel to real world" VI. 
    I have calibrated my camera per instructions in the NI Vision Assistant.  Strangely, once the program encounters the error and I stop execution of the VI, then re-run just the image processing VIs on the static image still retained in the wire, everything executes properly.
    I would appreciate any help in this matter,
    Thank you,
    German Coast Guard

    Have a look at Andrey's reply in this thread:
    http://forums.ni.com/ni/board/message?board.id=200​&message.id=18963&query.id=75915#M18963

  • Better method to search

    Hallo,
    the user want to habe a better method for searching.
    Example: 0customer. They want to have the change to search for M....er and geht all results like
    Maier, Meier, Mayer etc..... ist this possible.
    Thanks
    Santra

    Santra,
    M*er and then press F4...
    It doesn't work ?
    Bye,
    Roberto

  • What is the easiest method to convert your Outlook Mail from MS Office 2011 for mac, into Apple Mail?

    What is the easiest method to convert your Outlook Mail from MS Office 2011 for Mac, into Apple Mail?

    As best I can see from googling it, there is NO easy direct way with Apple's builtin tools.  If you Google it you will find that many software companies are selling Apps specifically designed for this purpose.  Good luck.
    Hope this helps

  • Is there any native method for converting String value to Hungarian notat..

    Hello. there.
    This might be very simple question. but I'm just curious about this.
    I am wondering if Java API offer the any native method for converting uppercased string value to lowercase which obey the Hungarian notation.
    What I'm going to do is using Reflection for excuting RFC function on SAP. I was found it is very similar to JDBC Programming.
    Please refer to blow codes.
    //mTable
    JCoTable mTable = function.getTableParameterList().getTable(rtnTblNm);
        for (int i = 0; i < mTable.getNumRows(); i++) {
         mTable.setRow(i);
         HashMap tmpData = new HashMap ();
              for (int j=0; j < mTable.getNumColumns(); j++) {
                     // I want to set key String [userNo] instead of  [USER_NO] here.
              tmpData.put(mTable.getMetaData().getName(j).toLowerCase(), mTable.getString(j));
              result.add(tmpData);
    } Basically, The idea was from ibatis framework [com.ibatis.common.beans.classInfo] dropcase();
    Any idea would be very helpful for me. Thank you.
    Edited by: hosung.seo on Aug 30, 2009 10:42 PM
    Edited by: hosung.seo on Aug 30, 2009 10:50 PM

    ejp wrote:
    Hungarian notation is a representation of logical/arithmetic expressions in postfix form. Not what you're talking about.
    So your title is very confusing to the people here who know what it means, which is probably all of them, because people read threads based on their title.From now on, I will pay more attention when I post an question.
    If the titile as " +Is there any native method for converting String value to camelcase?"+ would be easier to what i'm pointing at.
    As I mentioned in above sorce code, converting [USER_NO] to [userNo] isn't relevant Hungarian notation. yes, it was ambiguous. Agree! :)
    But some answer wasn't fit to converting case or recognizing "underscore" delimiter. I was expecting toCamelCase() such as blew. Thanks.
        public static String toCamelCase(String name) {
            String lowerName = name.toLowerCase();
            String[] pieces = lowerName.split("_");
            if (pieces.length == 1) {
                return lowerName;
            StringBuffer result = new StringBuffer(pieces[0]);
            for (int i = 1; i < pieces.length; i++) {
                result.append(Character.toUpperCase(pieces.charAt(0)));
    result.append(pieces[i].substring(1));
    return result.toString();

  • IPhone SDK: How to convert Pixel values into Point values

    UIScrollView has a property called contentSize. This takes values in points. How do i convert Pixel values into Point Vales?
    -TRS

    As far as I can tell, they're the same - I know they are in Photoshop at least. My 57x57 point Tab Bar icon is also 57x57 pixels.
    Hope that helps

  • Any method to convert OST to PST?

    Is there any method to convert ost to pst for outlook recovery without loos any important data during conversion?

    You want to helpful Solution to simply Convert OST to PST data? I
    would like to recommend  Microsoft OST to PST Conversion tool. The third party to can recovers mailboxes data from corrupt Outlook.ost files and 100% safely Conversion of OST file into PST file format and easily loaded Saved PST file into online Exchange/Outlook
    server.
    Get Free Trial:
    http://www.softwareimperial.com/ost-to-pst-converter.html
    @Maria Garcia

  • A better method?

    Hi, I use Forte for Java development. I tried to define a menu with some items having icons but not other. How can I align vertically the menu_item_text from a popup composed from both icon and non icon menu items? For now I'am thinking to add an empty icon to the non icon items. Is there any better method?
    thanx

    Hi, I use Forte for Java development. I tried to define a menu with some items having icons but not other. How can I align vertically the menu_item_text from a popup composed from both icon and non icon menu items? For now I'am thinking to add an empty icon to the non icon items. Is there any better method?
    thanx

  • Better method than switch?

    I have the following code.
    public Animalinfo(int animalInfo){
            switch (animalInfo) {
                case 1:File inputFile1 = new File("monkey.txt"); FileInputAnimal monkey = new FileInputAnimal(inputFile1);break ;
                case 2:File inputFile2 = new File("rooster.txt"); FileInputAnimal rooster = new FileInputAnimal(inputFile2);break ;
                case 3:File inputFile3 = new File("dog.txt"); FileInputAnimal dog = new FileInputAnimal(inputFile3);break ;
                case 4:File inputFile4 = new File("boar.txt"); FileInputAnimal boar = new FileInputAnimal(inputFile4);break ;
                case 5:File inputFile5 = new File("rat.txt"); FileInputAnimal rat = new FileInputAnimal(inputFile5);break ;
                case 6:File inputFile6 = new File("ox.txt"); FileInputAnimal ox = new FileInputAnimal(inputFile6);break ;
                case 7:File inputFile7 = new File("tiger.txt"); FileInputAnimal tiger = new FileInputAnimal(inputFile7);break ;
                case 8:File inputFile8 = new File("rabbit.txt"); FileInputAnimal rabbit = new FileInputAnimal(inputFile8);break ;
                case 9:File inputFile9 = new File("dragon.txt"); FileInputAnimal dragon = new FileInputAnimal(inputFile9);break ;
                case 10:File inputFile10 = new File("snake.txt"); FileInputAnimal snake = new FileInputAnimal(inputFile10);break ;
                case 11:File inputFile11 = new File("horse.txt"); FileInputAnimal horse = new FileInputAnimal(inputFile11);break ;
                case 12:File inputFile12 = new File("sheep.txt"); FileInputAnimal sheep = new FileInputAnimal(inputFile12);break ;
    //where fileinputanimal prints the text file in the window
            }It works and i can't see much else to addto it. But i was just wondering if anyone had other possible improvements on it, like a way of not adding a number to the end of each File inputFilex. Also, is there an alternate method to switce. I can't think of any myself, but that means i'll have to start working on a switch like above but containing around 500 cases in it this time.
    Any suggestions appreciated.

    Sazazezer_Mililipili wrote:
    Jeez, so much help in fifteen minutes alone. I feel bad for taking a day to respond.
    The animalInfo int comes from the user input. The user types in their date of birth. It then converts to a float so i can do 'year % 12', Okay, that makes sense. But an int would be better.
    Now...to learn about maps.Nah, since it's always going to be 0-11, and it's the numerical value that has significance, not some arbitrary "key", it's simpler to just stick with the switch statement. Do pay attention to the simplifications I gave you though, and rather than having the constructor do anything besides initialize the state of an object, after construction, call a print or display or whatever method.
    EDIT: Or, possibly better, go with the other poster's suggestion of an array of Strings, whose values are the file names.
    Edited by: jverd on Sep 25, 2008 2:15 PM

  • A method to convert an existing iCloud account to a Child iCloud Account for Family Sharing

    I do not see any method by which to convert an existing iCloud account (we have three set up for our kids, all their birthdays are set later than their actual birthdays so we could grab their actual names before they were all gone years ago) to a new Child iCloud Account for use with Family Sharing (namely to be able to take advantage of the new features: Family Calendar, Photostream, 'Ask to Buy' on the Stores, etc. on their own iPad minis.
    If this is just not possible under the current scheme, please oh please Apple make this an option - there are probably thousands of others in this same boat, and I refuse to give up my kids' iCloud accounts!

    I've read every string and workaround solution on these forums (to date). There's really no good options here.
    USER STORY: My kid (age 7) has an iPad 2.  I created an email address for him (which he doesn't know about). I created an apple ID for him (which he also doesn't know or care about) and I set up his Apple ID with my credit card.  In addition I've set up parental controls on the iPad to lock it down and make it more age appropriate.   Over the past year or so it's worked out fine, he sees something he might like, brings the iPad to me and if I approve, I enter the Apple ID Password  and approve the purchase.   After a year of doing this, he has a nice little collection of apps, kid songs, a few movies, etc.   I would like to move my kid over to a legitimate kid account now that Apple has released features that support this.  Currently the ability to convert an account does not exist. Seems like it should be easy to change a birthday, etc.
    Almost seems like Apple is penalizing us for getting our kid an iPad last year. 
    Apple  - Please consider my user story for your upcoming feature enhancements.

  • What are methods for converting otf to pdf format in sap script

    Hi,
    I have a requirement in script i have to convert that that otf file to pdf format,when i use function modules its corrupting that pdf file,So i want convert otf to pdf using class method any one can help me for that.If any sample coding for class method.
    Thanks.

    ok
    CALL FUNCTION 'CONVERT_OTF'
         EXPORTING
           format                = 'PDF'
    *      max_linewidth         = 255
         IMPORTING
           bin_filesize          = lv_bin_filesize
    *      bin_file              = pdf_xstring
         TABLES
           otf                   = lt_otf
           lines                 = lt_pdf_table
         EXCEPTIONS
           err_max_linewidth     = 1
           err_format            = 2
           err_conv_not_possible = 3
           err_bad_otf           = 4
           OTHERS                = 5.
    CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
          bin_filesize                    = lv_bin_filesize
          filename                        = c_name
          filetype                        = 'BIN'
    *     APPEND                          = ' '
    *     WRITE_FIELD_SEPARATOR           = ' '
    *     HEADER                          = '00'
    *     TRUNC_TRAILING_BLANKS           = ' '
    *     WRITE_LF                        = 'X'
    *     COL_SELECT                      = ' '
    *     COL_SELECT_MASK                 = ' '
    *     DAT_MODE                        = ' '
    *     CONFIRM_OVERWRITE               = ' '
    *     NO_AUTH_CHECK                   = ' '
    *     CODEPAGE                        = ' '
    *     IGNORE_CERR                     = ABAP_TRUE
    *     REPLACEMENT                     = '#'
    *     WRITE_BOM                       = ' '
    *     TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *     WK1_N_FORMAT                    = ' '
    *     WK1_N_SIZE                      = ' '
    *     WK1_T_FORMAT                    = ' '
    *     WK1_T_SIZE                      = ' '
    *     WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *     SHOW_TRANSFER_STATUS            = ABAP_TRUE
    *     VIRUS_SCAN_PROFILE              = '/SCET/GUI_DOWNLOAD'
    *   IMPORTING
    *     FILELENGTH                      =
         TABLES
           data_tab                        = lt_pdf_table
    *     FIELDNAMES                      =
        EXCEPTIONS
          file_write_error                = 1
          no_batch                        = 2
          gui_refuse_filetransfer         = 3
          invalid_type                    = 4
          no_authority                    = 5
          unknown_error                   = 6
          header_not_allowed              = 7
          separator_not_allowed           = 8
          filesize_not_allowed            = 9
          header_too_long                 = 10
          dp_error_create                 = 11
          dp_error_send                   = 12
          dp_error_write                  = 13
          unknown_dp_error                = 14
          access_denied                   = 15
          dp_out_of_memory                = 16
          disk_full                       = 17
          dp_timeout                      = 18
          file_not_found                  = 19
          dataprovider_exception          = 20
          control_flush_error             = 21
          OTHERS                          = 22.
       IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    TRY.
           GET PARAMETER ID 'RECEIPTENT' FIELD lvs_recipient1.
           send_request = cl_bcs=>create_persistent( ).
    *      lt_attach_bin = cl_document_bcs=>xstring_to_solix( ip_xstring = lt_solix ).
           APPEND 'Test message' TO lt_text.
           l_sub_50 = lc_test1.
           document = cl_document_bcs=>create_document( i_type    = 'RAW'
                                                        i_text    = lt_text
                                                        i_subject = l_sub_50 ).
           document->add_attachment( i_attachment_type    = 'PDF'
                                     i_attachment_subject = 'script.pdf'
                                     i_att_content_hex    =  lt_attach_bin ).
           l_sub_line = lc_test1.
           TRY.
    * Build subject line for email.
               CALL METHOD send_request->set_message_subject
                 EXPORTING
                   ip_subject = l_sub_line.
             CATCH cx_send_req_bcs INTO loref_obj_error.
               PERFORM sub_catch_error1 USING loref_obj_error.
           ENDTRY.
           send_request->set_document( document ).
    *      sender    = cl_cam_address_bcs=>create_internet_address( '[email protected]' ).
           recipient1 = lvs_recipient1-objkey.
           recipient = cl_cam_address_bcs=>create_internet_address( '[email protected]' ).
    *      send_request->set_sender( sender ).
           send_request->add_recipient( i_recipient = recipient
                                        i_express   = 'X' ).
           sent_to_all = send_request->send( i_with_error_screen = 'X' ).
           COMMIT WORK.
         CATCH cx_bcs INTO bcs_exception.
           MESSAGE 'eee' TYPE 'S'.
           EXIT.
       ENDTRY.

Maybe you are looking for

  • How can I sort all files and folders by size?

    Due to lack of space I need to find the biggest files and folders on my Mac OSX Mountain Lion, but "Size" is not in the Find options. And I don't know the wildcard to sort all files and folders by size in Easyfind. Thanks Sarah

  • ITS templates are not correctly loaded.

    Dear everyone, I am have a problem in installing ITS IAC template to ITS 4.6(it's old..) We are using EBP 2.0C and I newly installed ITS 4.6 and published all the necessary HTML templates. However, when I access to BBPSTART, it does not load expected

  • G5 xserve: How do I boot from a FireWire device ?

    Hi. I have a PowerPC G5 server WITHOUT a keyboard/display and have just installed Leopard 10.5.1. After setting up Leopard, I made a backup copy of the server HD onto a Lacie FireWire hard-drive device connected to the FireWire 400 port on the front-

  • First Row Record is not inserted from CSV file while bulk insert in sql server

    Hi Everyone, I have a csv file that needs to be inserted in sql server. The csv file will be format will be like below. 1,Mr,"x,y",4 2,Mr,"a,b",5 3,Ms,"v,b",6 While Bulk insert it coniders the 2nd column as two values (comma separte) and makes two en

  • SQL*plus not showing proper value.

    Hi All, In one of the database, while quering in sql developer data is showing data as "PüSS", but when trying sqlplus (client and server), its showing as "Puss", but the actual value is "PüSS". Oracle verion 10.2.0.4 and Linux. SQL> select sys_conte