CUTCODEDOWN
Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: Is it just a quirk? of the HTML  (Read 2116 times)

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 792
  • Karma: +8/-0
    • Grumpy Young Man
Is it just a quirk? of the HTML
« on: 14 Dec 2021, 10:51:00 am »
If you use:
Code: [Select]
    <ul>
        <li>Login</li>
        <li>Register</li>
    </ul>

It puts an annoying gap between the two LI choices, BUT if you use:
Code: [Select]
    <ul>
        <li>Login</li><li>Register</li>
    </ul>
It doesn't - now is this just a quirk of the HTML and code editor or is there a way to remove the gap?

Perhaps an very stupid question, but its one that annoys me...
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

coothead

  • Sr. Member
  • ****
  • Posts: 391
  • Karma: +89/-0
  • I smile benignly
    • coothead's stuff ~ an eclectic collection
Re: Is it just a quirk? of the HTML
« Reply #1 on: 14 Dec 2021, 11:36:21 am »
Hi there GYM,

I am unable to discern any HTML difference in either Firefox or Vivaldi.  ::)

Are you using any CSS in your test?

coothead
~ the original bald headed old fart ~

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 792
  • Karma: +8/-0
    • Grumpy Young Man
Re: Is it just a quirk? of the HTML
« Reply #2 on: 14 Dec 2021, 12:04:52 pm »
Hi there GYM,

I am unable to discern any HTML difference in either Firefox or Vivaldi.  ::)

Are you using any CSS in your test?

coothead
Yes, sure am!

No laughing - 'Pen.

(The double login/register options are there to highlight the problem)
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

coothead

  • Sr. Member
  • ****
  • Posts: 391
  • Karma: +89/-0
  • I smile benignly
    • coothead's stuff ~ an eclectic collection
Re: Is it just a quirk? of the HTML
« Reply #3 on: 14 Dec 2021, 01:05:28 pm »
Hi there GTM,

as expected,  the problem was in the CSS rather than the HTML::)

Full Page View
https://codepen.io/coothead/full/oNGBPoQ

Editor View
https://codepen.io/coothead/pen/oNGBPoQ

coothead
~ the original bald headed old fart ~

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 792
  • Karma: +8/-0
    • Grumpy Young Man
Re: Is it just a quirk? of the HTML
« Reply #4 on: 14 Dec 2021, 02:19:48 pm »
Hi there GTM,

as expected,  the problem was in the CSS rather than the HTML::)

Full Page View
https://codepen.io/coothead/full/oNGBPoQ

Editor View
https://codepen.io/coothead/pen/oNGBPoQ

coothead
Thanks, Coothead! 🙂

 I’m on my phone so I’ll have a proper look later on the laptop, looks like you made quite a few changes tho…
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

coothead

  • Sr. Member
  • ****
  • Posts: 391
  • Karma: +89/-0
  • I smile benignly
    • coothead's stuff ~ an eclectic collection
Re: Is it just a quirk? of the HTML
« Reply #5 on: 14 Dec 2021, 02:55:21 pm »
Quote from: GrumpyYoungMan
...looks like you made quite a few changes tho…

These are the CSS amendments I made...
Code: [Select]

body > header {
    display:flex;
    justify-content: space-between; /* added */
}

/*body > header h1,
body > header ul {
    flex: 0 50%;
}*/

/*body > header nav {
    flex: 1;
    text-align: right;
}*/

/*nav {
    padding-right:0.75em;
}*/

#headerOptions {
    padding:0.5em 0.75em 0 0; /* added */
}

#headerOptions ul{
    display: flex;
    list-style: none; /*added */
}

/*#headerOptions li {
 display: inline-block;
}*/

#headerOptions li:not(:last-child):after {
    content: "\2022";
    padding: 0.5em;
    /*display: inline-block;*/
}

coothead
~ the original bald headed old fart ~

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 792
  • Karma: +8/-0
    • Grumpy Young Man
Re: Is it just a quirk? of the HTML
« Reply #6 on: 15 Dec 2021, 01:17:00 am »
So, basically it looks like instead of using the LI as a inline block we flex the UL instead?

Although I’m not quite sure why the space around positions the h1 and nav to the left and right?


Thank you!!!
« Last Edit: 15 Dec 2021, 01:39:16 am by GrumpyYoungMan »
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 1054
  • Karma: +188/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Is it just a quirk? of the HTML
« Reply #7 on: 15 Dec 2021, 02:44:24 am »
Some other observations...

FORM is SECTION level, so why the section?

What makes "restricted area - login required" a heading describing what the section is/does and/or the creation of a new subsection?

IF you don't have a margin auto container inside a flex centering, if the screen is too short it will chop off the top with no ability to scroll up.

"HeaderOptions" is decidedly vague. That's your main menu isn't it?

Placeholder is for an example of what to type in, such as a username might be "JimboJones", not "username"

If your starting value is empty, don't say value=""

Pure red and pure brown are illegible on a dark background for most of the population, as is your nearly invisible dark blue on dark blue for the h1's anchor. Again checheckitycheck yourself...

Oh wait, that's the wrong link.
https://webaim.org/resources/contrastchecker/

The default type for a button is "submit", so you don't need to say that.

Your formatting is screwed up in firefox here, with the input bei9ng decidedly broken. I suspect that's your use of the "universal" reset screwing over sizing of INPUT tags. There's a reason I NEVER * { margin:0; padding:0; }, even in testing. It's also triggering double scrollbars at some screen sizes, that's likely a result of setting flex on HTML in addition to BODY. That can have weird side-effects.

Courier new is a shitty font-face for screen media, and you failed to provide a fallback family. (serif in this case)

Pages should only have one H1, thus saying "body > header h1" is pretty pointless;

And this is more of a silly nitpick, but your code formatting is all over the blasted place. It looks like tabs and spaces are intermingled and inconsistently applied. Though that could just be codepen's shitty editors screwing with things.

Czech it:

https://codepen.io/jason-knight/pen/jOGBNLZ




We are all, we are all, we are all FRIENDS! For today we're all brothers, tonight we're all friends. Our moment of peace in a war that never ends.

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 792
  • Karma: +8/-0
    • Grumpy Young Man
Re: Is it just a quirk? of the HTML
« Reply #8 on: 15 Dec 2021, 03:17:31 am »
Some other observations...

FORM is SECTION level, so why the section?

What makes "restricted area - login required" a heading describing what the section is/does and/or the creation of a new subsection?

IF you don't have a margin auto container inside a flex centering, if the screen is too short it will chop off the top with no ability to scroll up.

"HeaderOptions" is decidedly vague. That's your main menu isn't it?

Placeholder is for an example of what to type in, such as a username might be "JimboJones", not "username"

If your starting value is empty, don't say value=""

Pure red and pure brown are illegible on a dark background for most of the population, as is your nearly invisible dark blue on dark blue for the h1's anchor. Again checheckitycheck yourself...

Oh wait, that's the wrong link.
https://webaim.org/resources/contrastchecker/

The default type for a button is "submit", so you don't need to say that.

Your formatting is screwed up in firefox here, with the input bei9ng decidedly broken. I suspect that's your use of the "universal" reset screwing over sizing of INPUT tags. There's a reason I NEVER * { margin:0; padding:0; }, even in testing. It's also triggering double scrollbars at some screen sizes, that's likely a result of setting flex on HTML in addition to BODY. That can have weird side-effects.

Courier new is a shitty font-face for screen media, and you failed to provide a fallback family. (serif in this case)

Pages should only have one H1, thus saying "body > header h1" is pretty pointless;

And this is more of a silly nitpick, but your code formatting is all over the blasted place. It looks like tabs and spaces are intermingled and inconsistently applied. Though that could just be codepen's shitty editors screwing with things.

Czech it:

https://codepen.io/jason-knight/pen/jOGBNLZ
Thanks, I will work on that - will post the fixes for you to review!
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 792
  • Karma: +8/-0
    • Grumpy Young Man
Re: Is it just a quirk? of the HTML
« Reply #9 on: 15 Dec 2021, 04:28:49 am »
The 'pen has been updated with some of the changes Jason/CootHead have recommended, but I haven't finished yet, but my day job is calling me now so need to go to work to actually earn some money...

The only problem I have which hasn't been fixed yet, as it's beating me is the hover on the header, the small won't change colour on the hover, but the h1 text does... any ideas?
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

coothead

  • Sr. Member
  • ****
  • Posts: 391
  • Karma: +89/-0
  • I smile benignly
    • coothead's stuff ~ an eclectic collection
Re: Is it just a quirk? of the HTML
« Reply #10 on: 15 Dec 2021, 04:42:52 am »
Hi there GYM,

this...
Code: [Select]
h1 a:hover {
  color: #adff2f;
}
...needs to be this...
Code: [Select]
h1 a:hover,
h1 a:hover small {
  color: #adff2f;
}

coothead
~ the original bald headed old fart ~

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 1054
  • Karma: +188/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Is it just a quirk? of the HTML
« Reply #11 on: 15 Dec 2021, 07:19:53 am »
...needs to be this...
WHY? Small's default colour setting is inherit. There is no reason to set that. Even for pseudostates.
We are all, we are all, we are all FRIENDS! For today we're all brothers, tonight we're all friends. Our moment of peace in a war that never ends.

coothead

  • Sr. Member
  • ****
  • Posts: 391
  • Karma: +89/-0
  • I smile benignly
    • coothead's stuff ~ an eclectic collection
Re: Is it just a quirk? of the HTML
« Reply #12 on: 15 Dec 2021, 08:01:00 am »
Quote from: Jason
WHY? Small's default colour setting is inherit.

Be that as it may, GYM's code...

Code: [Select]
h1 a small {
  display: block;
  font: normal 0.5em Helvetica;
  color: #b0e0e6;
}

...appears to nullify it.

coothead
~ the original bald headed old fart ~

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 792
  • Karma: +8/-0
    • Grumpy Young Man
Re: Is it just a quirk? of the HTML
« Reply #13 on: 15 Dec 2021, 08:06:19 am »
Hi there GYM,

this...
Code: [Select]
h1 a:hover {
  color: #adff2f;
}
...needs to be this...
Code: [Select]
h1 a:hover,
h1 a:hover small {
  color: #adff2f;
}

coothead
I tried that and it didn't work as I expected it to - think from memory it would change if you went over the subheader but if you hovered over the H1 first it didn't!

Thank you!
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 1054
  • Karma: +188/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Is it just a quirk? of the HTML
« Reply #14 on: 15 Dec 2021, 08:24:50 am »
Be that as it may, GYM's code...
We must be looking at different code. I don't see that anywhere in his pens.
We are all, we are all, we are all FRIENDS! For today we're all brothers, tonight we're all friends. Our moment of peace in a war that never ends.

 

SMF spam blocked by CleanTalk

Advertisement