html - Having trouble creating a color palette -


For my project, I'm building an app that allows users to paint pictures.

I create managed canvas and paint brushes, and already know how to work JavaScript and jquery.

The only problem that I have to make color palettes.

HTML

  & lt; Div id = "colors" & gt; & Lt; Div style = "background: # 990000;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # cc0000;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # CC3300;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: #ffcc;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: #ffff03;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # ccff 00;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # 66FF00;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # 003300;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # 33 FFCC;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # 3300CC;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # 660033;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # 660066;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: # 000000;" & Gt; & Lt; / Div & gt; & Lt; Div style = "background: #ffffff;" & Gt; & Lt; / Div & gt; & Lt; / Div & gt;  

application.css

# Colors {Width: 180px; Height: 30px; }

I made a bela

If I add some text to div, like I did in Bella, I would see color I sang, but they are all on their separate line, like the color, it should be a color selection box, where there are 7 colors per line, though only colors, and no text.

I also set width and height properties for my color div to render a color box

Updated here:

  #color div {width : 25px; Height: 30px; Swim left; }  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -