13

let's say I have a very long line of inline styling, for example:

<input type="radio" style="visibility: hidden; position: absolute; foo: bar; baz: foo; etcetera: etc; and: more;">

and then I decide to make it more readable like this:

<input type="radio" style="visibility: hidden; position: absolute;
    foo: bar; baz: foo; etcetera: etc; and: more;">

Does this affect the functionality or is it okay to break it into multiple lines like this?

reifier
  • 155
  • 1
  • 8
  • 1
    I'm sure you've heard this before, but avoid inline styles and you won't even have to worry :) – Ry- Jul 12 '12 at 17:23
  • Yes I have, and I agree. I'm just cleaning up other people's code that's really poorly formatted..it's a nightmare to read and maintain. – reifier Jul 12 '12 at 17:31

2 Answers2

10

It's fine. White space doesn't affect the browsers interpretation of that CSS or rendering of that element.

John Conde
  • 217,595
  • 99
  • 455
  • 496
0

its actually do in img tag

code: image that show you multiline inline styling

result: image that show you result with unwanted special character added to the style

arga wirawan
  • 217
  • 1
  • 2
  • 14
  • https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-on-so-when-asking-a-question/285557#285557 – Yunnosch Jan 04 '23 at 07:51