Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen show does not match final result of following tutorial. #29285

Closed
jessewwarner opened this issue Sep 25, 2023 · 2 comments
Closed

Screen show does not match final result of following tutorial. #29285

jessewwarner opened this issue Sep 25, 2023 · 2 comments
Labels
Content:Learn:Forms Learning area Forms docs effort: small This task is a small effort.

Comments

@jessewwarner
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Learn/Forms/How_to_structure_a_web_form

What specific section or headline is this issue about?

Active learning: building a form structure

What information was incorrect, unhelpful, or incomplete?

The screenshot showing what the result of building the form described in steps 1-8 should look like does not match the final result. The final result does match the form shown on the page that loads when the "running live" link is clicked. However, the final result appears to be a poorly designed form with the labels and asterisk in incorrect positions. The problem appears to be the following CSS code that was provided:

label span {
    display: inline-block;
    width: 120px;
    text-align: right;
}

This bit of CSS is making both the labels and asterisks 120 pixels wide and aligned right, causing them to be in awkward positions. Changing this CSS code to the following looks much better:

label>span {
    display: inline-block;
    width: 120px;
    text-align: left;
}

At the very least, please fix the screenshot to match what the final form actually looks like with the provided code, so it doesn't look like the results of following the tutorial are wrong. However, changing the CSS so only the spans that are direct children of labels are 120px wide and aligned left makes the form look much better, so consider changing that too and updating the "running live" page.

What did you expect to see?

I expected for my final results to match the screenshot shown. The final results did not match, so I thought I may have made a mistake following the tutorial. However, when I clicked the link to see the live version of the form, it and my results matched. Although, there are still some issues regarding how the CSS is styling the form that should be addressed as well.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@jessewwarner jessewwarner added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Sep 25, 2023
@github-actions github-actions bot added the Content:Learn:Forms Learning area Forms docs label Sep 25, 2023
@wbamberg
Copy link
Collaborator

Thank you for filing!

It looks like what's happening here is that the "screenshot" is actually the result of scooping up all the code fragments in that section and sticking them inside an iframe, using the EmbedLiveSample macro. This code attempts to include CSS:

<link href="payment-form.css" rel="stylesheet" />

...but that doesn't work in the EmbedLiveSample system, and as a result the "screenshot" does not get any styling at all.

Then the page at https://mdn.github.io/learning-area/html/forms/html-form-structure/payment-form.html, as you point out, has broken styling. If you fix the style as you suggest, it looks all right.

So I think the fix is twofold:

@Josh-Cena Josh-Cena added effort: small This task is a small effort. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Sep 30, 2023
@zfox23
Copy link
Contributor

zfox23 commented Oct 27, 2023

I appreciate the detail in this issue as well as the discussion! :) I'm closing this in favor of the resolution reached in mdn/learning-area#609.

@zfox23 zfox23 closed this as completed Oct 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:Learn:Forms Learning area Forms docs effort: small This task is a small effort.
Projects
None yet
Development

No branches or pull requests

4 participants