SyntaxPro Posted December 5, 2010 Share Posted December 5, 2010 vertical-align: 13px; = The image is 1 pixel above vertical-align: 12px; = The image is 1 pixel below. vertical-align: 12.5px; = The image is level. How can you have a half of a pixel? Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/ Share on other sites More sharing options...
requinix Posted December 5, 2010 Share Posted December 5, 2010 It figures into the calculations made by the browser. Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143136 Share on other sites More sharing options...
SyntaxPro Posted December 5, 2010 Author Share Posted December 5, 2010 So when using vertical-align... u can use half pixels? Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143142 Share on other sites More sharing options...
SyntaxPro Posted December 5, 2010 Author Share Posted December 5, 2010 Can someone explain this to me? Its confusing the hell out of me Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143260 Share on other sites More sharing options...
The Letter E Posted December 5, 2010 Share Posted December 5, 2010 As far as I know you CANNOT use a half pixel UNLESS you are styling a text element... GOOD EXAMPLE: #myDiv { font-size: 12.5px; } BAD EXAMPLE: #myDiv { width: 350.5px; } I think the common misunderstanding is that a pixel is some relative form of measurement. A pixel is a standardized unit and the smallest usable screen element. A pixel contains only one solid color created by mixing light intensities such as red, green, and blue(RGB), or cyan, magenta, yellow, and black(CMYK). I hope this helps a little bit. You can definitely find more in depth info if you keep searching. Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143264 Share on other sites More sharing options...
SyntaxPro Posted December 5, 2010 Author Share Posted December 5, 2010 Well I don't understand how you can have a font-size or vertical-align with a half of a pixel... is there any other way to explain more about this? Thanks for the help so far Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143349 Share on other sites More sharing options...
The Letter E Posted December 6, 2010 Share Posted December 6, 2010 Well I don't understand how you can have a font-size or vertical-align with a half of a pixel... is there any other way to explain more about this? Thanks for the help so far I'm not sure on the font-size. BUt you can't have a .5 on an align. Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143426 Share on other sites More sharing options...
SyntaxPro Posted December 6, 2010 Author Share Posted December 6, 2010 Does anyone know why? or do they just do it... if i look and my image needs to be moved up 4 pixels to be level... why do i gota put 3.5 to level it out.. makes no sense! /wrist Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143446 Share on other sites More sharing options...
Philip Posted December 7, 2010 Share Posted December 7, 2010 Ever heard of subpixel rendering? http://en.wikipedia.org/wiki/Subpixel_rendering Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143846 Share on other sites More sharing options...
fortnox007 Posted December 7, 2010 Share Posted December 7, 2010 vertical-align: 13px; = The image is 1 pixel above vertical-align: 12px; = The image is 1 pixel below. vertical-align: 12.5px; = The image is level. How can you have a half of a pixel? maybe off topic but may vertical-align: middle; help you? (or top) Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143874 Share on other sites More sharing options...
SyntaxPro Posted December 7, 2010 Author Share Posted December 7, 2010 I heard of sub pixel rendering, but why if i hit print screen and count that the DIV with text is 13 pixels off from being leveled with the image on its left... why do i have to put 12.5 to level it out... it should be 13 logically... makes no sense Quote Link to comment https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143892 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.