How do I create multi colored boxes using CSS3

OS - Windows 7 using DW Cs5.5
I need to create a screen with lots of equally sized colored boxes with text colours that will be visible easily within them.
I have a class set up as follows:
.yellowbox {
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    font-size: small;
    color: #F00;
     background-color: #FC3;
    text-align: center;
    vertical-align: middle;
    margin: 4px;
    padding: 4px;
    clear: none;
    float: left;
    height: 10em;
    width: 30%;
    position: relative;
    border: thick solid #F00;
This displays a box that is yellow with a red border.
With a set of 9 divs of this class, I get 9 boxes arranged as a 3x3 grid in a 960px wide container.
How do I modify the CSS so that the background color changes with each box, and the text color is always in a color that is readable?

First change the CSS as follows
.box {
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    font-size: small;
    color: #F00;
    text-align: center;
    vertical-align: middle;
    margin: 4px;
    padding: 4px;
    clear: none;
    float: left;
    height: 10em;
    width: 30%;
    position: relative;
    border: thick solid #F00;
.yellow {
   background-color: #FC3;
.blue {
   background-color: blue;
Then use the following markup
<div class="box yellow">
or
<div class="box blue">

Similar Messages

  • How to create multi instance monitoring using VSAE

    i have a class and it has multiple instances which inturn has data about each and every instance as performance logs etc
    i need to get the data about each every instance and add some property bag data appropraitely.
    how can i achieve this, how can i create multi instance monitoring in VSAE  and how to create rules for multi instance.
    SCOM Version:SCOM 2012 R2
    Thanks & Regards, Suresh Gaddam

    Hi 
    the discovery of the class will populate the class object property's and discovery can discovery multi instance of class, make sure there is a key property for class.
    once you target a rule or monitor a workflow will be create for each instance, as the rule target to the class you can pass class instance and host class property's as parameters.
    for examples check below link 
    http://channel9.msdn.com/Series/System-Center-2012-R2-Operations-Manager-Management-Packs/-Mod7
    regards
    sridhar v

  • Creating multi counter plan using LSMW

    Hi,
    I am trying to create multi counter plan (transaction IP43) using LSMW. I am using direct input object 0460 for creating it. Object has IBIPMPLA structure as header. How can i pass multi counter data in it ? Problem is line item level values like 'Maintenance cycle' (ZYKL1) are at header level structure IBIPMPLA.
    Anyone has cretaed multi counter using this object, please help me with it.
    Thanks,

    Hi,
    creating multi counter plan using LSMW
    Try this link,
    http://www.sapfans.com/forums/viewtopic.php?f=7&t=217834&p=1059434
    It will helps to you.
    Regards,
    Sekhar

  • How can i create multiple accounts but use the same itunes?

    how can i create multiple accounts but use the same itunes?

    Hi iCloud is Making Me Go Crazy,
    You will need to create a new Apple ID for your GameCenter and iCloud services.  You can continue to use the current Apple ID you share with your Mom for access to iTunes Store purchases if you wish. 
    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/HT5622
    Cheers,
    - Judy

  • Purchased a second iphone need to create an account, however the computer already has an itunes account...How do I create a second  account using one copy of itunes on a computer??

    Purchased a second iphone need to create an account, however the computer already has an itunes account for the first iphone...How do I create a second  account using one copy of itunes on single computer??

    Why do you need a new account?
    Use the same account on both.
    How to use multiple iPods, iPads, or iPhones with one computer

  • How can I create a new label using Pages and Avery Labels products?

    How can I create a new label using Avery LAbels and PAges on an imac?

    Contacts prints to Avery labels.
    Otherwise just open the appropriate Word template from Avery's website, in Pages.
    Peter

  • HT4191 iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.

    iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.  I've seen reference to the  "My iPhone" local storage put no mention on how you create this folder or access this folder within the Notes app.  I realize storing information in a local storage like this provides no syncing between other iDevices but that is exactly what I'm looking for.  I'm running iOS7.0.4 on a iPhone 5S, and a iPad Air.  Any help would be greatly appreciated.

    If you go to Settings > Notes > Default Account you will see "On My iPhone" as the default account and the only choice if you have not enabled syncing Notes in Settings >iCloud or Settings > Mail, Contacts, Calendars. If you have enabled syncing you can still select "On My iPhone" as the default account. When you are in the Notes app you won't see any accounts listed if you have not enabled syncing because they are all in the On My iPhone account and that is the only place possible. It is not a folder that you create.

  • How do i create a mail box in the SMTP server thru a java program

    How do i create a mail box in the SMTP server thru a java program. If it is possible thru a java program.pls suggest a mail server compatible for the above possibility to work.
    pls help ....

    Please let me know if it is not at all possible to
    create a user account automatically thru a program
    (java) in a mail server... how does yahoo work
    then..does he manually add a user to the mail
    server...By talking to a web server not a mail server.
    >
    Is not there any mail server that will allow us to
    create mailboxes for my java program.. how do the
    other web account services work..
    As I said mail servers do have management interfaces. You need to find one and then determine what the management interface is.

  • How does one create a "check box" in a cell?

    How does one create a "check box" in a cell?

    select the cell then open the cell formatter:
    process should be similar in the iOS version.  I do not have any iOS devices with Numbers so I cannot check.  I did find this link that may help:
    http://support.apple.com/kb/PH3374?viewlocale=en_US

  • How can I get Multi-color text it a swing componet?

    How can I get Multi-color text it a swing componet?
    I've tryed JTextPane and JEditorPane.
    If they support having text in more then one color then I don't see how.
    I want to make a color-coded Java editor in Java, but I can't color-code if I can only have one color.
    JComponent.setForeground(Color fg)
    is not what I need.
    maybe Java doesn't support it yet.
    but I hope it does.
    Please help, thanks.

    Hi,
    I've made you a little example with a coloured JEditorPane and JTextPane:
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ColorDemo extends JFrame {
         public ColorDemo() {
              super("ColorDemo");
              // coloured JEditorPane
              JEditorPane editorPane = new JEditorPane("text/html",
                   "<FONT color=red> This </FONT>"+
                   "<FONT color=blue> is </FONT>"+
                   "<FONT color=green> a </FONT>"+
                   "<B> JEditorPane </B>");
              editorPane.setPreferredSize(new Dimension(250, 150));
              // coloured JTextPane
              JTextPane textPane = new JTextPane();
              textPane.setPreferredSize(new Dimension(250, 150));
              Document doc = textPane.getDocument();
              Style def = StyleContext.getDefaultStyleContext().
                   getStyle(StyleContext.DEFAULT_STYLE);
              try {
                   StyleConstants.setForeground(def, Color.blue);
                   doc.insertString (0, "This ", def);
                   StyleConstants.setForeground(def, Color.red);
                   doc.insertString (5, "is ", def);
                   StyleConstants.setForeground(def, Color.green);
                   doc.insertString (8, "a ", def);
                   StyleConstants.setBold(def, true);
                   StyleConstants.setForeground(def, Color.black);
                   doc.insertString (10, "JTextPane", def);
              } catch (Exception e) {}
              JPanel contentPane = new JPanel();
              contentPane.add(textPane);
              contentPane.add(editorPane);
              setContentPane(contentPane);
         public static void main(String[] args) {
              JFrame frame = new ColorDemo();
              frame.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
              frame.pack();
              frame.setVisible(true);
    }Hope this helps,
    Kurt.

  • How do I create a single image using PSE12 from multiple originals where each original is still separate?

    How do I create a single image using PSE12 from multiple originals in which the originals are still separate (i.e. side by side or arranged in a square)? I could do this in PSE2, but can't find how to get PSE12 to do it.
    Grecophile55

    In PSE2 there was a single photo-merge. I browsed all my images and I could then click and drag each to its new position before saving. There doesn’t seem to be a similar facility in PSE12.

  • I need to know how I will create a dynamic website using php and mysql

    I need to know how will I create a dynamic website using php and mysql that people could have the abilities of registering in the website, and modify their profile where they can add their pictures and everything. apart from that, they should have the ability to search about other member. hope to here more from you.

    If you are a right-brained creative, and have no previous experience or propensity to be able to understand coding and database "stuff", and/or if your time can be better spent on other skills, I recommend you save your sanity and hire a developer... or at least the first time around. I have been attempting to grasp this for years... and have a library of marked up books to prove my efforts, all while trying to keep up with an ongoing client base that is always cramped. It's a wonder I still have my sanity... then again, I might not be the best person to determine that. Others might question it.
    That said, I still plan to master php... one of these days.

  • How can we create such navigation buttons using Flash CS4?

    Hi,
    How can we create such navigation buttons using Flash CS4 is in the following website? Please help me with any such tutorial to make my custom navigation bar/buttons.
    http://city.reallusion.com/join.html
    Thanks.

    While the Note 4 is a reasonably large device it still falls into the phone layout bucket. We need this layout to function on very small screens some as low as 320 pixels high and 240 pixels wide. These sorts of devices don't have the space for a full toolbar.

  • How do you create a seach box in MUSE?

    how do you create a seach box in MUSE? - viewer enters a keyword and will be lead to correct product

    Hi there - For questions about individual programs, you're better off posting in their specific forums. Here's the Muse forum: http://forums.adobe.com/community/muse/general_questions_about_adobe_muse
    That being said, there is currently not a search bar widget that can be added to a site directly from within Muse. However, you can add custom HTML code to your page, with a method such as this: http://www.ehow.com/how_6772398_embed-google-search-bar.html. Just add the custom HTML to your Muse page by going to Object > Insert HTML.
    This page might also help you out: http://www.adobe.com/products/muse/embedded-html.edu.html
    Good luck!

  • HT2589 how can i create apple id without using credit card details ?

    how can i create apple id without using credit card details ?

    @Limnos - that doesn't work anymore. There is no NONE option. I've been at it for hours trying to set up my daughter's account. I've tried creating and verifying an appleID on the web, on her touch...everything. Every single time you get to the stupid Touch, it wants to walk you through the verification of the account and it demands payment (even for their suggested apple Remote method listed in the KB).

Maybe you are looking for