Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-20-2011, 11:49 AM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
half a pixel in css ?

i am looking at source for a book where css has entries like
p {
margin-top:4.5px;
margin-bottom:4.5px;
}

if px = pixel then how is half a pixel implemented - makes no sense to me

why would anyone code in fractions of a pixel ?
cybmole is offline   Reply With Quote
Old 02-20-2011, 11:54 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Surprisingly, a pixel might be something different than a pixel:

Normally, the pixel unit refers to physical pixels of the viewing device. However, if the pixel density of the output device is very different from that of a typical computer display, the user agent should rescale pixel values.

From the CSS3 spec
Jellby is offline   Reply With Quote
Advert
Old 02-20-2011, 12:03 PM   #3
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
thanks for the link & the explanation - it's not clear what they consider to be a low resolution screen though as they give no screen size examples.
thus I am none the wiser as to what 0.5px actually translates to
a) on my Kindle screen
b) on my 1920x1200 pc screen.

Another reason to avoid px & stick with em measurements, I think!

though I have to admit that the book with the 4.5px borders looks good on both screens!
cybmole is offline   Reply With Quote
Old 02-20-2011, 01:17 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by cybmole View Post
thanks for the link & the explanation - it's not clear what they consider to be a low resolution screen though as they give no screen size examples.
thus I am none the wiser as to what 0.5px actually translates to
a) on my Kindle screen
b) on my 1920x1200 pc screen.

Another reason to avoid px & stick with em measurements, I think!

though I have to admit that the book with the 4.5px borders looks good on both screens!
px is a (mostly) fixed measurement
em is a scaled measurement.
If you Zoom , em values scale.
theducks is offline   Reply With Quote
Old 02-23-2011, 02:18 PM   #5
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
A pixel is fixed for most monochome devices but on a color device a pixel is really a color triad or in the case of e-Ink a color quad consisting for a 2x2 array. In these cases a sub-pixel is defined to be used for anti-aliasing and other tasks so a .5 pixel would make sense for color devices.

Dale
DaleDe is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub CSS versus "Regular" CSS konrad ePub 4 02-18-2011 09:29 AM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM
Pixel Qi Balerion Amazon Kindle 8 08-14-2010 04:53 PM
Pixel Qi update jerome News 1 06-01-2010 01:35 PM
half of my screen is blank and the other half is stuck in the USB condition. modsoul Sony Reader 1 11-04-2007 10:03 AM


All times are GMT -4. The time now is 11:01 AM.


MobileRead.com is a privately owned, operated and funded community.