Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/30/2023 in all areas

  1. The code is the same as if one wrote .translate-div { display: inline-block; vertical-align: middle; } .logo-div { display: inline-block; vertical-align: middle; background-color: red; color: #fff; text-align: left; } Since both .logo-div and .translate-div have the same display and vertical-align styles, they were combined into a single block. The second block then has the styles that apply only to .logo-div. If block 3 specified the same property as block 2, then yes the block 3 value would be applied. Since both blocks specify different properties, there is no overriding necessary.
    1 point
  2. ^^^^^^^^^^^^^^^^^^^^^^^ 100% This video is highly recommended. Try out some of the simple code he shows, and you should be able to figure out how to make it apply to your desired layout. The video does a great job describing which use cases are better suited to a particular layout.
    1 point
  3. Save yourself the time and trouble and use either flex or grid. It'll make your life much easier.
    1 point
  4. sorry for how this sounds, but this code is programming nonsense. the biggest problem with it is that OOP is not about wrapping class definitions around main application code, then needing to add $var-> in front of everything to get it to work. all this is doing is creating a wall of unnecessary typing, that's changing one defining and calling syntax for another more verbose one. additional problems with this code is that it is insecure in may places, it is applying htmlspecialchars and strip_tags improperly to input data, it has no validation or error handling logic, it is using a prepared query for queries that don't have any external data being used, it is not properly using a prepared query that have external data being used, it is repetitive, and it's class methods/functions don't accept input data as call-time parameters (requiring even more $var->property statements to make it work.) the only correct programming practices it contains are - it is using dependency injection to make a single database connection available to the classes that need it and it is using a COUNT() query in a few places to get counts of matching data. don't waste any time on using this code, either as a learning resource or as a way of achieving a discussion forum.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.