• I am editing the site construction.hernandezpi.com and I have been having trouble getting the text boxes to be transparent. I have successfully created a Child theme and can edit its CSS but Im not sure what code to use to make just the text boxes transparent. The reason I need this is because I would like the background image to be visible but not to detract from the content of the text boxes. Can anyone help me figure this out?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Exactly what do you mean when you say “text boxes?” In web design, a text box is an input field where a user can enter text, but I don’t see any on the home page. If you are referring to the main content area, which currently has a white background, you can change the transparency by adding this rule to the end of your child theme’s style.css file:

    .post-inner-content {
      background-color: rgba(255, 255, 255, 0.85);
    }

    The first three numbers are for the red, green, and blue color balance. 255 for each gives you a white color. The last value (0.85) is the transparency. You can set that value to any number between 0 (fully transparent) to 1.0 (fully opaque). So 0.85 means it’s 85% opaque (15% transparent). You can play around with the transparency, but you don’t want to make it too transparent or your visitors won’t be able to see the text very easily.

    You can also play around with making the background gray and the text white:

    .post-inner-content {
      background-color: rgba(25, 25, 25, 0.8);
      color: #fff;
    }

    As long as you keep the three color values the same, you’ll get shades between black (0 for all three) and white (255 for all three).

    Thread Starter sethpkendall

    (@sethpkendall)

    I did mean the inner content box rather than a “text box.” Thank you CrouchingBruin, you interpreted my intent correctly. Your suggestions were exactly what I was looking for. I also took your second suggestion and I think it looks great. Is there another line of code I can add to change the title color as well?

    construction.hernandezpi.com

    Oops, I overlooked that. Add this rule:

    .entry-title {
      color: #fff;
    }

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Transparent Text Boxes on Child theme CSS’ is closed to new replies.