Reputation: 43
so ive got my code and theese color bubbles things wont align to the toolbar ive included all the code. apart from the javascript as i do not think it is needed.
Its a simple drawing application and i need theese "color bubbles" to be up on the tool bar and they are kind of hanging down. Please help me!
HTML CODE:
<html>
<head>
<title>Project - Draw</title>
<link rel="stylesheet" href="drawstyle.css">
</head>
<body style='margin:0'>
<div id="toolbox">
<div id="rs">
Radius <span id="rsvalue">10</span>
<div id="decrs" class="rscontrol">-</div>
<div id="incrs" class="rscontrol">+</div>
</div>
<div id="colors">
<div class="swatch active"></div>
<div class="swatch"></div>
<div class="swatch"></div>
</div>
</div>
<canvas id="canvas" style="display: block;">
Your browser dose not support this application. Get Chrome!!! :(
</canvas>
<script src="draw.js"></script>
<script src="radius.js"></script>
</body>
** CSS CODE:**
*{
box-sizing: border-box;
-moz-box-sizing: border-box;
font-family: sans-serif;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
#toolbox {
width: 100%;
height: 50px;
padding: 10px;
position: fixed;
top: 0;
background-color: #2B2B2B;
color: #D4D4D4;
}
.rscontrol {
width: 30px;
height: 30px;
background-color: #9E9E9E;
display: inline-block;
text-align: center;
padding: 5px;
}
#rscontrol {
float: left;
}
#colors {
float: right;
}
.swatch {
width: 30px;
height: 30px;
border-radius: 10px;
box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 2px 2px
rgba(0, 0, 0, 0.5);
display: inline-block;
margin-left: 10px;
}
I know its not all aligned properly ^CSS^ but it is in my version i just have to do 8 spaces to get it to show up as 'code'.
Here is a screenshot. They are there in the top right. And you can also see a live version here.
Upvotes: 0
Views: 48
Reputation: 17927
just add float: left
to rs
div, like this:
#rs{
float: left;
}
Example on fiddle: http://jsfiddle.net/SWRaA/
Upvotes: 1