I’m gonna quietly skip past my misinterpretation of your question
and blame my blooper on a caffeine deficit. Your example in post #63 is punctuated incorrectly and I assumed your intent incorrectly, too; thus the tangent.
main .tcell {...} applies {display:table-cell} to all elements with the class .tcell within the main element; therefore, <div class="tcell myfonts"> already has {display:table-cell} assigned and class myfonts assigned with additional styles. (an advantage of classes)
If you are using IDs, then combine the styles from the two classes like this…
#myfonts {
display:table-cell; /* from .tcell */
text-align:center; /* from .tcell */
vertical-align:middle; /* from .tcell */
padding:1em .5em .5em; /* from .myfonts */
}
and your HTML should be fine. Using IDs, you end up with a lot of duplicated properties which are awkward to maintain, or groups of comma-separated selectors. Neither is very efficient.
In post #65#content is a block element and does not need a width assigned. Also, 100% is an invalid display value.
{vertical-align:middle} is not inherited and should be applied to the table-cells, not the table.
Because IDs are unique and heavier than uranium, stringing IDs is undesirable. Use #content-wrapper {} instead of #content #content-wrapper {}.
Finally, when I wrote my code, I gave the .tcell around the slider slightly less width that the .tcell around the myfonts image because the intrinsic widths of the slider and the image are different and I wanted them to begin scaling down at the same time.
BTW…what tool do you use to measure browser width ? Say you shrink the browser window and you think…ok here I am gonna change some CSS…how do you measure it to a pixle?
I use Firefox, but started using Firebug rather than the built-in dev tools. (I think Firebug preceeded FF’s built-in dev tools.) Looks like you can get a good how-to about FF’s dev tools here, including the dev version of FF… https://developer.mozilla.org/en-US/docs/Tools
It does - Firefox was the last of the five most popular browsers to build in developer tools and Firebug is closer to what the other browsers provide as built in tools.
If all you are looking at is the screen size, using “Responsive Design View” will allow you to change the view size and see the size in pixels as you do. This can help identify break points.
That css is typical for the img element, but it will generally have a containing element (figure or div) which is responsive, via width: auto (default for blocks), % width or flex. Then the image just fills it.
I tend to use max-width: 100% on the image, so it goes no larger than its native size, but will shrink within its responsive container if needed.
Fundamentally, yes; but… achieving the desired result may depend on the context… the surrounding code. Within blocks, @SamA74’s example works fine. But the CSS for the resizing of an image within table-cells in Firefox is different (see my code).
BTW…I can see your point now about .classes vs #ids that you mentioned at the beggining of this exercise…As soon as I am done I am going to change all ids to classes…Probably going to end up with less code