The Real Problem With Being At The Center Of Programming

The Real Problem With Being At The Center Of Programming

I kinda feel bad about the keyword for this post being “CSS Centering”. I can just see someone in the future desperately trying to center an image within a table and coming upon this post after consulting Father Google. I’m sure this is not what they were looking for, however, it would be a great read …… if they had the time to spare.

I’ve written on this subject before; it is a great topic to illustrate the awful design of programming languages. Once a computer language reaches popular support, changes should be few if any and slow to impalement. However, this is not the case. The foolishness being highlighted by the ongoing nonsense of HTML & CSS.

When you go to center anything, all languages or markups to be precise should allow, and browsers should render, around this code:

<center>Your Image</center>

OK, are we good here? Nuff said! Only …… the above code is what is defined as a “Deprecated Element” or “Tag”. What???

Now, I understand the necessities of “styling” the center. But the “Inline”, “Center” tag solves a ton of problems. However, the W3C have now deprecated the center element. It still works occasionally, but you can never tell how the popular browsers will render the code.

You now style the center with CSS …… kinda. You can place the CSS within the HTML code as well as within a “Stylesheet”. What???

Consider this explanation from W3C; “The CENTER element is exactly equivalent to specifying the DIV element with the align attribute set to “center”. The CENTER element is deprecated”.

Only problem …… you can never tell how this method will render within any given browser. Enter “CSS Resets” and “The Universal Selectors”.

Only problem …… you can never tell how this method will render within any given browser.

For our above example of the image, let’s do this:

img.center {   display: block;   margin-left: auto;   margin-right: auto; } (with the corresponding html:) <img src=”yourimage.jpg” alt=”#” />

Only problem …… you can never tell how this method will render within any given browser.

You have not only images, but tables, buttons, text and block elements to center as well.

Only problem …… you can never tell which of the centering methods will work with which elements within any given browser.

I have nearly 5 years of doing this type of design and I still have to Google all sorts of methods of centering when I go to center anything. I usually windup mixing and matching methods to get the desired effect to render within the different browsers that are popular today.

Now, I told you all that to tell you this. To find time to learn other programming languages is almost impossible, as I am constantly chasing the latest method of doing anything within HTML or CSS, let alone MySQL or PHP. And, they are just as bad with their Standards.

Sorting the old from the new is the biggest of nightmares with these markups and programming languages as public repositories and libraries containing old code you can reuse are extensive and are just waiting from some poor soul to wander along and download the misery.

I can only imagine the misery that lies ahead for myself as I expand my knowledge of programming languages to add value to my customers. There is one ray of hope in all this however …… most all programming languages claim that they are backwards compatible …… “yeah, right”!

 

Comments are closed.