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, 12:49 PM   #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: 2,971
Karma: 1280000
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
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, 12:54 PM   #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: 6,259
Karma: 4801167
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
Old 02-20-2011, 01: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: 2,971
Karma: 1280000
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
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, 02:17 PM   #4
theducks
Grand Sorcerer
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: 15,100
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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, 03: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: 9,747
Karma: 5072196
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
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
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 10:29 AM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 06:09 PM
Pixel Qi Balerion Amazon Kindle 8 08-14-2010 05:53 PM
Pixel Qi update jerome News 1 06-01-2010 02: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 11:03 AM


All times are GMT -4. The time now is 10:56 PM.


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