question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update CatPhotoApp for better appearance

See original GitHub issue

Forewarning, this may be bike-shedding worthy…

Workspace

User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36. (Chrome on Windows 7)

Setting

The CatPhoto is where you make an web page and one component is adding three buttons like below.

image

Problem

But then you will eventually make it into something like this below.

image

Notice that the red Delete button is squished and on the side (this is mostly a desktop problem; mobile user won’t have the same issue – see below)

Mobile Version

image

Solution

So I propose two things:

  • Change the “Delete” button into a “Edit” button so it’ll fit on the button better.
  • Add new challenge to add in making all three of those buttons also have the class btn-sm to make the text inside the button not seem all smushed.
    • This one will require a little more effort in making an entirely new challenge, which may be unnecessary.

Example:

<button class="btn btn-block btn-info btn-sm"><i class="fa fa-info-circle"></i> Info</button>

If the proposed changes were made, the finished app will look like this:

image

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
andrewtdinhcommented, May 13, 2016

Hi there,

As long as you guys are looking into UI issues on the simulated view, maybe you can also fix the breaking into two lines of the ‘Loving’ checkbox:

image

2reactions
jnmorsecommented, Apr 2, 2016

how about changing the buttons to be inside a button group

  <div class="row">
    <div class="col-xs-12">
      <div class="btn-group btn-group-justified" role="group">
        <div class="btn-group" role="group">
          <button class="btn btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
        </div>
        <div class="btn-group" role="group">
          <button class="btn btn-info"><i class="fa fa-info-circle"></i> Info</button>
        </div>
        <div class="btn-group" role="group">
          <button class="btn btn-danger"><i class="fa fa-trash"></i> Delete</button>
        </div>
      </div>
    </div>

apparently the btn-group around each buttons is nessary when using actual buttons and not anchor elements… [Bootstrap: button groups justified](http://getbootstrap.com/components/#btn-groups- justified)

kittens

I believe .btn-block is meant to for full-width buttons so it is perhaps not playing nice with .col-xs-4

Sorry noticed this was supposed to be about using the grid, and not just making the buttons look nicer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Learn HTML by Building a Cat Photo App (1-10) - YouTube
Timestamps:00:00 - Intro02:20 - 103:18 - 204:16 - 305:00 - 406:33 - 508:29 - 609:56 - 711:07 - 812:15 - 913:28 - 10GitHub: ......
Read more >
CatPhotoApp Step 12 - HTML-CSS - The freeCodeCamp Forum
CatPhotoApp Step 12 ... The code in your screenshot looks good. ... What happen to the help link from before the update?
Read more >
FreeCodeCamp: Basic HTML and HTML5 | by Eleftheria Batsou
A good practice is to remove the unnecessary HTML elements ... HTML is an evolving language, and is updated regularly. Most major browsers...
Read more >
HTML head Elements - W3Schools
Refresh document every 30 seconds: <meta http-equiv="refresh" content="30">. Setting the viewport to make your website look good on all devices:.
Read more >
Web Development from Beginner to Paid Professional: Build ...
</form> </main> Figure 1.28.1 shows the updated cat photo app: ... For now, we're going to look at one called the inspector.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found