Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-27-2015, 11:23 AM   #1
oiver55
Enthusiast
oiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windows
 
Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
What does this do?

I was looking up some code to get a certain look and found this.

"@media amzn-mobi" What does this code do?

Here is the whole css.

Code:
div.x2{
position:absolute; top:50%; margin-top: -2em; left:0; right:0;
}
div.x3 {
text-align: center;
}
@media amzn-mobi 
{
div.x2{margin-top:30%;}
}
oiver55 is offline   Reply With Quote
Old 09-27-2015, 11:36 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'll give you a hint what it doesn't have anything to do with.
DiapDealer is offline   Reply With Quote
Advert
Old 09-27-2015, 11:43 AM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,313
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
According to W3schools.com:

Quote:
The @media rule is used to define different style rules for different media types/devices.

In CSS2 this was called media types, while in CSS3 it is called media queries.

Media queries look at the capability of the device, and can be used to check many things, such as:

width and height of the viewport
width and height of the device
orientation (is the tablet/phone in landscape or portrait mode?)
resolution
and much more
Basically it's asking the reader/device if it is an "amzn-mobi"...if it is, then it applies the styling of "margin-top:30%" rather than the "margin-top:-2em". I'm assuming that is because amzn-mobi devices don't support the "position:absolute" styling?? Non amzn-mobi devices would have the x2 div (Chapter head?) start 2em up from the middle of the screen height while amzn-mobi would simply start 30% down from the top.

Cheers,
Turtle91 is offline   Reply With Quote
Old 09-27-2015, 11:44 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,313
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by DiapDealer View Post
I'll give you a hint what it doesn't have anything to do with.

Oooh, oooh, oooh....pick me!


"Sigil!!"

Turtle91 is offline   Reply With Quote
Old 09-28-2015, 06:04 AM   #5
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
It's a "media call" and it's used to distinguish between Amazon KF8 (modern) and Mobi 7 (old) devices. Unlike Apple, Amazon tries very hard not to obsolete its older models, so it still supports the first Kindle, released in 2007. That's an eternity in e-book lives.

For what it's worth, I think it's nutty to force text that far down a "page." I drop my chapter heads 1 em from the top. Works on all devices.

I don't use drop-caps, either, so I've never found a practical use for media calls. I'm sure that more ambitious designers use them all the time.
Notjohn is offline   Reply With Quote
Advert
Old 09-28-2015, 11:53 AM   #6
oiver55
Enthusiast
oiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windows
 
Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
Thanks
oiver55 is offline   Reply With Quote
Reply


Forum Jump


All times are GMT -4. The time now is 09:37 PM.


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