Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9128497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:31:42+00:00 2026-06-17T07:31:42+00:00

I get a little lost on css stylesheet syntax. My dilemma is that I

  • 0

I get a little lost on css stylesheet syntax. My dilemma is that I have four <div> tags with ROUGHLY the same style, except the colors are different or one may float: left but another tag might not have that.

So I was thinking I could add id to all of these so that I can move these style statements into the stylesheet.

How would I address each individual id in the stylesheet? I’m thinking something like div#id or something. Lets assume basic div is already unavailable, but I want some abstract stylesheet tag that at least contains display:block and font-size:11px and then a more specific stylesheet tag to address each <div> tag by its id or class or name.

<div style="display:block; color:steelblue; float:left; font-size:11px;">Open Requests&nbsp;</div>
<div id="openNumber" style="display:block; color:steelblue; font-size:11px; clear:right;">13</div>

<div style="display:block; color:green; float:left; font-size:11px;">Completed Requests&nbsp;</div>
<div id="completeNumber" style="display:block; color:green; float:left; font-size:11px;">13</div>

I get a little turned around on the syntax for different selector types

Thanks for any insight

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:31:43+00:00Added an answer on June 17, 2026 at 7:31 am

    You could try the following:

    css:

    .floatLeft { float: left; }
    .clearRight { clear: right; }
    .open { color: steelblue; font-size: 11px; }
    .complete { color: green; font-size: 11px; }
    

    html:

    <div id="openRequests" class="open floatLeft">Open Requests&nbsp;</div>
    <div id="openNumber" class="open clearRight">13</div>
    
    <div id="completeRequests" class="complete floatLeft">Completed Requests&nbsp;</div>
    <div id="completeNumber" class="complete floatLeft">13</div>
    

    A <div> is already a block-level element, so you don’t need to specify display: block on it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a little bit lost. I have created a small app that is starting
This might get a little confusing as I have tried everything to make this
I have a little experience with WCF and would like to get your opinion/suggestion
I need some help setting up a PHP array. I get a little lost
I am a little lost with the current documentation I have. I am trying
When i type in either of the textboxes i get little circles appearing instead
I'm trying to get a little program to send hex over RS232. From what
I am a programming beginner, and would like to get a little help with
Try running this in a .VBS file MsgBox(545.14-544.94) You get a neat little answer
I need a little help here: I get a file from an HTML upload

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.