• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • HTML Expand To Fit

    September 6th, 2012
    html, tech
    If I have a block of text that I want to expand to fill the screen, there ought to be some way to specify this in HTML. Specifically, I want to put contra dance calling cards on my phone [1]. I definitely don't want any scrolling, and I'd like them to be as big as possible. I've figured out a hackish way to do this with javascript, but there ought to be a clean way. The hackish way:
    Draft: Trip To Lambertville
    This runs a little loop:
      make font huge
      while vertical scroll bar present:
        make font a little smaller
    
    While this works, I really ought to be able to ask the browser nicely "make this as big as will fit" instead of forcing it to do something so stupid [2]. Is this possible with just html and css?


    [1] To replace the tiny illegible index cards in my wallet.

    [2] Yes, I could use binary search. O(n) → O(log(n)). Still stupid.

    Comment via: google plus, facebook

    Recent posts on blogs I like:

    Rereading Roald Dahl

    Taking out a few words doesn't change much. The post Rereading Roald Dahl appeared first on Otherwise.

    via Otherwise March 25, 2023

    What does Bing Chat tell us about AI risk?

    Early signs of catastrophic risk? Yes and no.

    via Cold Takes February 28, 2023

    Why Neighborhoods Should Have Speed Bumps

    I have several reasons I think why neighborhoods should have speed bumps. First, speed bumps are very useful to stop cars from hitting people in the streets. Second, when construction workers installed speed bumps on the street in front of our house it was v…

    via Lily Wise's Blog Posts February 27, 2023

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact