www.webdeveloper.com
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2012
    Location
    Austria
    Posts
    34

    units: use inch or pixel?

    Hey everyone,

    considering cross browser compatibility would you recommend to calculate the pixel value by myself or can I rely on the browser, when entering the values in inches?

    Are there any advantages / disadvantages for one of the two options in your opinion?

    thanks for help,

    Steve

  2. #2
    Join Date
    Dec 2011
    Posts
    74
    I would avoid inches personally. Pixels provides more accuracy however I'm not sure I fully understand what you mean with regards to cross-browser compatibility?

    To be honest, I'm not sure what you mean by calculating the pixel value


  3. #3
    Join Date
    Mar 2012
    Location
    Austria
    Posts
    34
    concerning cross-browser-compatibility I mean that browsers may not convert inches to pixels precisely.

    with calculating the pixel value i mean to convert inches to pixel on my own (with a self-written javascript function) instead of letting the browser convert.

    I hope you understand me better now

  4. #4
    Join Date
    Dec 2011
    Posts
    74
    I see no good reason to not use pixels for inches when defining some elements.
    What is it you're applying a height/width to? I suppose that's the relevant question I need to ask... !

  5. #5
    Join Date
    Mar 2012
    Location
    Austria
    Posts
    34
    I use to apply a height and width to a div and to position elements precisely inside the div.

  6. #6
    Join Date
    Dec 2011
    Posts
    74
    I see. Wouldn't using percentage values be more suitable especially considering the users desktop dimensions and browser?

  7. #7
    Join Date
    Mar 2012
    Location
    Austria
    Posts
    34
    nope, because I'm trying to build a WYSIWYG-Editor and the div should represent one page of a document. So I think there is no other way than using pixels or what do you think?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



Recent Articles