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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.