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

  • SEARCH
  • Home
  • 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 7995575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:27:20+00:00 2026-06-04T14:27:20+00:00

When I assign background-color: foo; to a element in my CSS file I do

  • 0

When I assign “background-color: foo;” to a element in my CSS file I do not get any colour. What other attributes do i need to declare, I have a absolute width set? Does it need a parent container (it has a basic as a parent)? What am I missing here?!

Also I’d like to give it round-corners using HTML5. Corners only have to work in Safari as it’s for a web app not general consumption.

  • 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-04T14:27:22+00:00Added an answer on June 4, 2026 at 2:27 pm

    It seems you have 2 questions:
    1. set background to an element; 2. you wanna set round corners to an element and works in safari.

    1. if you element is div tag, you need to set width,and height of your div tag, e.g:

      <div id='mydiv'>some elements here</div>

    Your css:

       #mydiv { 
          background-color: #111;
          height: 100px;
          width:100px
       }
    

    2. Setting round-corner(code below works for all browsers):

       .round-corner {
          -webkit-border-radius: 5px 5px 5px 5px; 
          -moz-border-radius: 5px 5px 5px 5px;
          -o-border-radius: 5px 5px 5px 5px;
          border-radius: 5px 5px 5px 5px;
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I simply try to assign a background color to each div. it looks simple
I have 4 items in and I want to assign 4 different background-color to
Is it possible to assign a background color for a certain text part inside
I am trying to change the background color of a td element in a
The goal: to randomly assign different color CSS backgrounds to a Wordpress-generated tag cloud
I got the following css: #navlist li #current { color: #000; background: #FFFFFF; border-bottom:
I have a div element which has these css attributes : HTML <div class=messageContainer></div>
Ok guys so a little background... I'm writing a small application that will assign
//assign variables string measurementIn; //read in file in array string[] lines = File.ReadAllLines(../../convert.txt); //ask
How to change the background color of a view dynamically? Do I set a

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.