What's new

Welcome to the forum 👋, Visitor

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

Code Blind and a Question about Selectors

Ahr Aitch

New member
Joined
Aug 12, 2023
Messages
11
Reaction score
0
HTML Coins
14
Code Blind Question
I have a class defined with font size = 9px. The class also centers text. When I code the class into my HTML, there is no effect. My text inherits its size from the class above it.
I've looked at it so long I've gone code blind. A screenshot showing the text as displayed is attached with a fuschia rectangle around the code that is supposed to be font size = 9px.
The CSS file (clan.css) is properly linked in the HTML cod, I think. I have changed other CSS statements and seen the effects on the browser screen.

If anyone can spot what I've gone blind to, I'd very much appreciate your telling me what I'm missing. Rub my nose in it, please.

Selector Question
You can see that I used <div> selectors to apply formatting to various parts of my HTML. Is there a more appropriate selector that I should have used?

CSS:
.photo-legend
{
  text-align: center;
  font-size: 16px;
}

.small-photo-legend
{
  text-align: center;
  font: 9px;
}

HTML:
<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link type="text/css"
        rel="stylesheet" href="clan.css" media="screen">
    <h8><!-- Date goes here -->
    </h8>

    <title> The Hutchins Clan </title>

  </head>
  <body>
    <!-- Header Goes Here; maybe just a menu row  -->
      <div class="photo-heading"> Healy and Pa</div>
    <div class="large-image"><img src="healy-and-pa-ca-1956.jpg" alt:healy and pa class="img1"></div>
      <div class="photo-legend">
    Standing in front of their home at<br>527 N. East Street, Raleigh, NC (circa 1956)
    </div>
    <hr></hr>
    <hr></hr> <!-- hor. row next page marker -->
    <div class="photo-heading">The Hutchins Family</div>
    <div class="photo-subheading">The only Photograph Ever Taken of the Whole Clan</div>
    <div class="clan-image"><img src="the-clan-in-color-cropped-with-blur.png"
    alt="the clan" class="img2"></div>
 
        <div class="photo-legend">Healy Heady Mauden Baker Hutchins and Charles
            Haddon Spurgeon Hutchins<br>
        Robert Haddon, Nancy Catherine, Mary JoAn, John Fox, James Alfred, <br>Elizabeth Lee "Baby Lee", Frank Tabor, Charles Baker, William Spurgeon "Bill"</div>
        
    <div class="small-photo-legend">(Parents, center front; offspring - left to right, youngest to oldest, with the oldest, Bill, at right front)
    </div>
    <hr></hr>
    
</body>
</html>
 

Attachments

  • VSC 1 2023-09-23_15h42_23.png
    VSC 1 2023-09-23_15h42_23.png
    39.7 KB · Views: 0
I know it's bad form to reply to one's own posts, but I found and fixed the code blind problem. The last line of the CSS, before the closing brace, should have been font-size: 9ps instead of font; 9px.

Going code blind is a tough! :cool:


I can still use advice on selectors.
 
Last edited:

Theme customization system

You can customize some areas of the forum theme from this menu.

  • Wide/Narrow view

    You can control a structure that you can use to use your theme wide or narrow.

    Grid view forum list

    You can control the layout of the forum list in a grid or ordinary listing style structure.

    Picture grid mode

    You can control the structure where you can open/close images in the grid forum list.

    Close sidebar

    You can get rid of the crowded view in the forum by closing the sidebar.

    Fixed sidebar

    You can make it more useful and easier to access by pinning the sidebar.

    Close radius

    You can use the radius at the corners of the blocks according to your taste by closing/opening it.

  • Choose the color combination that reflects your taste
    Background images
    Color gradient backgrounds
Back