Jump to content

Half Pixel


SyntaxPro

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143264
Share on other sites

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)

Link to comment
https://forums.phpfreaks.com/topic/220716-half-pixel/#findComment-1143874
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.