Is it a bad practice to hide elements with CSS when you can't remove them with php? -


Sometimes when I can not find a way to disable the function or any other element with PHP, in particular The PHP framework and CMS in PHP, I just do display: none , I wonder if it will make me many problems in future or an essential method?

It depends on what kind of elements are

coming to the potential mind Problems with:

  • An tag or another source pointing to external resources: it will still load < Li> same applies to iframe tag - the embedded page will load even if display: none is not set
  • Hidden elements < / Li>
  • If the client closes the CSS in the client The element will still be visible,
  • The client who automatically parses the dome may not realize that any element is hidden
  • The element still has any Javascript will be present in the eyes DOM manipulations

    In addition to these special cases, it will probably not be a problem.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -