2

I'm self-teaching myself CSS and is using W3schools

I created a button where once clicked it'll send you to another page, which works, but now I wanted to style it but my CSS isn't doing anything and I'm thinking it's the naming convention.

input [type=submit] {
  -webkit-appearance: button;
  -moz-appearance: button;
  appearance: button;
  background-color: white;
}
<form action="info-page-1.html">
  <input type="submit" value="What's going on?">
</form>
j08691
  • 204,283
  • 31
  • 260
  • 272
Paige
  • 159
  • 6
  • 6
    No space in `input [type=submit]`. E.g. `input[type=submit]` – j08691 Sep 24 '21 at 17:22
  • 1
    And please do not use w3schools.com! Their content is really out of date. – no ai please Sep 24 '21 at 17:23
  • 1
    @Someone_who_likes_SE thank you, is there a website that you would recommend? – Paige Sep 24 '21 at 17:24
  • 4
    Consider using MDN: https://developer.mozilla.org/en-US/docs/Web – Heretic Monkey Sep 24 '21 at 17:24
  • also appearance doesnt need a prefix anymore. Its supported by all browsers. – tacoshy Sep 24 '21 at 17:24
  • @Someone_who_likes_SE [this isn't exactly true anymore](https://www.w3fools.com) – Christian Gollhardt Sep 24 '21 at 17:25
  • @ChristianGollhardt And when was that site last updated? ;-P – Heretic Monkey Sep 24 '21 at 17:26
  • @ChristianGollhardt then why does W3School still teach to sue float for styling pupose instead of Grid or Flexbox? Or that `height: 100%` has no influence when the height of the parent is calculated? It still doesnt teach to use semantics such as the `nav` tag for navigation bars. They teach to use `display: inline` for the navigation bar instead of flexbox. They dont teach the important stuff like the difference between physical and software pixels when you use media queries... To know which topics actually good at w3school you would require a decent nowledge base before... – tacoshy Sep 24 '21 at 17:31

1 Answers1

0

Please try to remove space between "input" and the bracket, e.g. "input[type=submit]". This might be the issue, as described here: What are the rules around whitespace in attribute selectors?

Alex
  • 815
  • 9
  • 19
  • 1
    easy to try test it yourself. However you should not answer on typo cause questions. Those question should be flagged as `not reproducible or caused by typos` instead. Those questions will be closed and removed and as such all awarded points reverted. There is no reward in breaking the guideliens by answerign instead of commenting those questions. – tacoshy Sep 24 '21 at 17:26