« Previous Blog Next Blog »  

My Faulty Function


Article created:- September 2, 2021 12:30 pm
Last modified:-

Written by:- MJS

Filed and cataloged as:- News, Outings, Reviews

[ Operational notes ]

After nine (ten) months of leaning CSS HTML and JS, ..
This poxy Newbie has only now just discovered how to combine classes, (within a declaration.)

Prior to me finally figuring that out, the ignorant tosspot was using # and IDs in my HTML code and style-sheets respectively.

It worked, as in:-

<a class="img-spacer" id="command-links" .. etc ..

But in doing this, I then found the code being hammered by all of the website speed-testers found out there. With all of them pointing out my (I thought: unavoidable), errors, but it seems not!

So, to recap:
During the PHP (server-side) < a href > link build, ..

If the link *is* active; then the PHP string is built thus:-

<a class="img-spacer command-links"

However, if the link is *not* active; then the string is built thus:-

<a class="img-spacer dimmed-command-links no-furniture"

** with {dimmed-command-links} and {no-furniture} classes doing very different things to the HTML layout respectively.

Inside my Iconic Menu, (as used in the Book-Stand), then the constructed css class used above, is now followed by the normal HREF arguments, as in:-

href="' . $troot . $link . '" >

{ Technically what follow after that, is the actual **text** of a normal href link, but I’m using a constructed image in this instance.}

<img loading="lazy"
class="' . $img .'"
src="' . $menu_icon . '"
alt="Picture Icon to open the ' . $book_name . ' book page"
width="120" height="120" /> 
</div>';

{ Prior to my discovery, I was using:-

a#command-links:hover

Which is WRONG! 

In-line, and using class=”” — we now do the very simple color changing text rollover link with:-

a.command-links:hover 

These new global css classes are now found in the sites main css stylesheet. }

<div class="NameLink">
<p style="margin: .1em 0 1em .3em; text-align: left;"> '. $book_name . '</p></a>

The above text (as part of the link itself), now simply changes color when the mouse-pointer-rolls over them. As it all did when using #, but now with no speed test ID errors, and all by simply using class=””, instead of id=””.

Still kicking myself for not figuring it out earlier, hope it helped, ..

 

Thanks for reading, Jessica: Praise be the ORI.

 

  « Previous Blog Next Blog »  
April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

WARNING!

localStorage Cookie info. This website uses simple cookies, and even simpler localStorage structures. (Enabling dynamic functionality.) They are not used for any other purpose.

To view this book site, you must be considered as an ADULT (with legal consent) in your current location to proceed any further. Failure to comply, could result in a criminal prosecution (within the local domicile) that you physically reside.

Theses web-pages aren't for children, nor any childish attitudes towards sexual ambivalence.
It is for -- ADULTS ONLY!

Pressing [ No! ] - Will take you away, to another type of less salubrious activity, that's obviously more suited to your young tender age (and/or) delicate disposition.

Only press [ YES! ] if you understand the terms. After that, a one year cookie will be set on your browser, thusly declaring you to be an adult, (a constitutional time-Warrior), with all of your timely facilities intact.

It's a big decision that you're about to undertake, choose wisely: because you can never go back.