From 098b744301da91795c2f10d1579d25f4cb2a39b6 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 6 Jul 2011 23:13:25 +0200 Subject: [PATCH] put star in a div --- css/star.css | 22 +++++++++++----------- js/star.js | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/css/star.css b/css/star.css index ec953bc..54765b1 100644 --- a/css/star.css +++ b/css/star.css @@ -1,11 +1,11 @@ -#blackboard{width:320px;height:180px;background:#333;float:left} -.starcell{width:20px;height:20px;display:block;float:left;text-align:center} -.selected{font-weight:bold} -.wall{background-image:url(../themes/HP48/tex_wall.png);color:#000} -.ball{background-image:url(../themes/HP48/tex_ball.png);color:#99f} -.cube{background-image:url(../themes/HP48/tex_cube.png);color:red} -.ball_selected{background-image:url(../themes/HP48/tex_ball_selected.png);color:#99f} -.cube_selected{background-image:url(../themes/HP48/tex_cube_selected.png);color:red} -.gift{background-image:url(../themes/HP48/tex_gift.png);color:yellow} -.void{background-image:url(../themes/HP48/tex_empty.png);} -.selected{background:#555} +.gstar{float:left;width:100%} +.gstar #blackboard{width:320px;height:180px;background:#333;float:left} +.gstar #blackboard .starcell{width:20px;height:20px;display:block;float:left;text-align:center} +.gstar #blackboard .wall{background-image:url(../themes/HP48/tex_wall.png);color:#000} +.gstar #blackboard .ball{background-image:url(../themes/HP48/tex_ball.png);color:#99f} +.gstar #blackboard .cube{background-image:url(../themes/HP48/tex_cube.png);color:red} +.gstar #blackboard .ball_selected{background-image:url(../themes/HP48/tex_ball_selected.png);color:#99f} +.gstar #blackboard .cube_selected{background-image:url(../themes/HP48/tex_cube_selected.png);color:red} +.gstar #blackboard .gift{background-image:url(../themes/HP48/tex_gift.png);color:yellow} +.gstar #blackboard .void{background-image:url(../themes/HP48/tex_empty.png);} + diff --git a/js/star.js b/js/star.js index e981cf6..572f9e1 100644 --- a/js/star.js +++ b/js/star.js @@ -137,7 +137,8 @@ function load_level( levelset, nb ) { } function display_level( state, elt ) { - $( elt ).html( '

' + format_level( state, false ) + '

' ); + var starhtml = '

' + format_level( state, false ) + '

'; + $( elt ).html( starhtml ); }