← HTML + CSS

Ajuda (.css)

Lida 6451 vezes

Offline

mygodess 
Membro
Mensagens 8 Gostos 0
Troféus totais: 12
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 2 Level 1 First Post Sixth year Anniversary Fifth year Anniversary Fourth year Anniversary Third year Anniversary

Boas tenho o plugin 'kk rating star' para o wordpress, e o que se passa é que o meu tema é preto, para contrastar com o fundo deste plugin ,que é branco, como não percebo de .css , precisaria que me ajudassem na mudança deste "simples" código.

Está assim:


Gostaria que ficasse assim:


O código (.css) do plugin em questão é este :
Código: [Seleccione]
@charset "utf-8";
/* CSS Document */

.kk-ratings {
margin: 0px 5px;
padding: 0px;
height: 40px;
width: 120px;
position: relative;
background-image: url(../images/off.png);
background-repeat: repeat-x;
}
.kk-ratings .stars-turned-on {
margin: 0px;
padding: 0px;
width: 0%;
height: 24px;
position: absolute;
left: 0px;
top: 0px;
z-index: 0;
background-image: url(../images/on.png);
background-repeat: repeat-x;
}
.kk-ratings .stars-turned-strict {
background-image: url(../images/over.png) !important;
}
.kk-ratings .hover-panel {
margin: 0px;
padding: 0px;
height: 24px;
width: 120px;
position: relative;
z-index: 1;
}
.kk-ratings .hover-panel a {
margin: 0px;
padding: 0px;
float: left;
height: 24px;
width: 24px;
text-decoration: none;
}
.kk-ratings .hover-panel a.hovered-star {
background-image: url(../images/over.png);
background-repeat: no-repeat;
}
.kk-ratings .casting-desc {
width: 120px;
line-height: 16px;
text-align:center;
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
color:#AAA;
}
.kk-ratings .casting-thanks {
width: 120px;
line-height: 16px;
text-align:center;
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
color:#248E62;
}
.kk-ratings .casting-error {
width: 120px;
line-height: 16px;
text-align:center;
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
color:#F66;
}
.kk-ratings .casting-thanks {
display: none;
}
.kk-ratings .casting-error {
display: none;
}
.kk-ratings span {
display: none;
}

Caso possam ajudar eu agradeço imenso...

Um muito obrigado...
Offline

João Pacheco 
Membro
Mensagens 226 Gostos 0
Troféus totais: 23
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Viva.

Será que o fundo do plugin não está em imagem?
Offline

Legues 
Membro
Mensagens 18 Gostos 0
Troféus totais: 14
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 3 Level 2 Level 1 10 Posts First Post Sixth year Anniversary Fifth year Anniversary

Se pudesses mostrar o codigo html tb, ajudava-me mais um bocado!!!
Todavia parece-me ser um problema de fácil resolução!!!

Se o fundo for gerado através de uma imagem, terás de alterar a cor na imagem, numa ferramenta de edição de imagem, tipo photoshop ;
caso contrário, se for gerado por css terás simplesmente de adicionar a propriedade background-color:#000000 dentro da classe
.kk-ratings, quase de certeza, mas para confirmar gostaria que me mostrasses o codigo html deste sistema de ratings!!!
Offline

João Pacheco 
Membro
Mensagens 226 Gostos 0
Troféus totais: 23
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

De certeza que está em imagem.

Visto o fundo ser branco e não ter a propriedade "background-color" com #FFFFFF.

Se quiseres que dê uma olhada manda-me PM.

Abraço
Offline

Legues 
Membro
Mensagens 18 Gostos 0
Troféus totais: 14
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 3 Level 2 Level 1 10 Posts First Post Sixth year Anniversary Fifth year Anniversary

É o que eu suspeito!!! De certeza!! No entanto sem codigo HTML...
Offline

mygodess 
Membro
Mensagens 8 Gostos 0
Troféus totais: 12
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 2 Level 1 First Post Sixth year Anniversary Fifth year Anniversary Fourth year Anniversary Third year Anniversary

Eu peço-vos desculpa pela ignorância, mas de verdade não consigo descortinar nenhuma página (.html), se vos poder mostrar esse código,pedia-vos também que me ensinassem como o fazer.    
    
Estas são as páginas do plugin em causa dispostas no wordpress que se pode modificar:
    kk-star-ratings/kk-ratings.php
    kk-star-ratings/css/kk-ratings.css
    kk-star-ratings/admin/options.php
    kk-star-ratings/readme.txt
    kk-star-ratings/widget.php
    kk-star-ratings/js/kk-ratings.js
    kk-star-ratings/ajax/kk-ratings-ajax.php
Offline

tartofs 
Membro
Mensagens 205 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Tenth year Anniversary Nineth year Anniversary Windows User Linux User Mobile User Level 5 Super Combination Combination Topic Starter Level 4

Que theme utilizas?

Se colocares uma imagem .png sem background, ele passa a imagem a fundo branco?

Se for esse o caso, a solução está no CSS do theme e não do plugin.
Offline

João Pacheco 
Membro
Mensagens 226 Gostos 0
Troféus totais: 23
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Faz o seguinte, vê que imagem está no fundo dos ratings, se a conseguires localizar anexa aqui.

Outra coisa, copia e cola o código-fonte desta página:  kk-star-ratings/widget.php.

Abraço
Offline

mygodess 
Membro
Mensagens 8 Gostos 0
Troféus totais: 12
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 2 Level 1 First Post Sixth year Anniversary Fifth year Anniversary Fourth year Anniversary Third year Anniversary

Faz o seguinte, vê que imagem está no fundo dos ratings, se a conseguires localizar anexa aqui.

Outra coisa, copia e cola o código-fonte desta página:  kk-star-ratings/widget.php.

Abraço
Supostamente isso da imagem de que falam será o 1º código que postei dentro de "kk-ratings.css" em background-image: url(../images/off.png);
Código: [Seleccione]
.kk-ratings {
margin: 0px 5px;
padding: 0px;
height: 40px;
width: 120px;
position: relative;
background-image: url(../images/off.png);
background-repeat: repeat-x;

Código kk-star-ratings/widget.php :

Código: [Seleccione]
<?php

// Make sure class does not already exist (Playing safe).
if(!class_exists('kk_Ratings_Widget') && !function_exists('kk_ratings_widget_init')) :

class 
kk_Ratings_Widget extends WP_Widget
{
// Runs when OBJECT DECLARED (Instanciated)
public function kk_Ratings_Widget()
{
$widget_options = array(
'classname' => 'kk-star-ratings-widget',
'description' => 'Show top rated posts'
);
parent::WP_Widget('kk_Ratings_Widget''kk Star Ratings'$widget_options);
}
// Outputs USER INTERFACE
public function widget($args$instance)
{
extract$argsEXTR_SKIP );
$title = ( !empty($instance['title']) ) ? $instance['title'] : 'Top Posts';
$total = ( !empty($instance['noofposts']) ) ? $instance['noofposts'] : '5';
$sr = ($instance['showrating']) ? true false;

echo $before_widget;
echo $before_title $title $after_title;

// OUTPUT starts
    global $wpdb;
$table $wpdb->prefix 'postmeta';
$posts $wpdb->get_results("SELECT a.ID, a.post_title, b.meta_value AS 'ratings' FROM " $wpdb->posts " a, $table b WHERE a.post_status='publish' AND a.ID=b.post_id AND b.meta_key='_kk_ratings_avg' ORDER BY b.meta_value DESC LIMIT $total");
echo '<ul>';
foreach ($posts as $post)
{
   echo "<li><a href='".get_permalink($post->ID)."'>".$post->post_title."</a>";
   if($sr)
   {
   echo " <span style='font-size:10px;'>(".$post->ratings."/5)</span>";
   }
   echo "</li>";
}
echo '</ul>';
// OUTPUT ends

echo $after_widget;
}
// Updates OPTIONS
/*
public function update()
{

}
*/
// The option FORM
public function form$instance )
{
?>

        <p>
            <label for="<?php echo $this->get_field_id('title'); ?>">Title:
            <input id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr(!empty($instance['title'])?$instance['title']: 'Top Posts'); ?>" /></label>
        </p>
        <p>
            <label for="<?php echo $this->get_field_id('noofposts'); ?>">No of Posts:
            <input id="<?php echo $this->get_field_id('noofposts'); ?>" name="<?php echo $this->get_field_name('noofposts'); ?>" type="text" value="<?php echo esc_attr(!empty($instance['noofposts'])?$instance['noofposts']: '5'); ?>" size="3" /></label>
        </p>
        <p>
            <label for="<?php echo $this->get_field_id('showrating'); ?>">Show Average?:
            <select id="<?php echo $this->get_field_id('showrating'); ?>" name="<?php echo $this->get_field_name('showrating'); ?>">
                <option value="0" <?php if(!esc_attr($instance['showrating'])){echo "selected='selected'";} ?>>No</option>
                <option value="1" <?php if(esc_attr($instance['showrating'])){echo "selected='selected'";} ?>>Yes</option>
            </select>
            </label>
        </p>
        <?php
}
}

function 
kk_ratings_widget_init()
{
register_widget('kk_Ratings_Widget');
}
add_action('widgets_init''kk_ratings_widget_init');


endif;
?>
Offline

cjseven 
Administrador
Mensagens 1809 Gostos 26
Feedback +3

Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1 1000 Posts

Instala o firebug (addon do firefox) e em 90% dos casos descobres o que define o estilo dos elementos de uma página.

Ou então posta o URL do site para quem quiser ajudar poder analisar. Se não queres indicar o site por privacidade, então torna-se complicado. Só vai lá com postas de pescada :)
Offline

Bruno Gaspar 
Membro
Mensagens 242 Gostos 1
Feedback +3

Troféus totais: 18
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 3 Level 2 Level 1 100 Posts 50 Posts 10 Posts

O fundo branco é das imagens.
Offline

felipeantunes 
Membro
Mensagens 66 Gostos 0
Troféus totais: 23
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 50 Posts 10 Posts

por isso que nao sou fã de word press, criam se designers com formação incompleta ou erradas. com quase toda certeza deve ser um background colocado na div ou span que contenha a estrela. Há pequena chance da imagem da entrela ter undo branco tb, mais acho díficil
Offline

mygodess 
Membro
Mensagens 8 Gostos 0
Troféus totais: 12
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 2 Level 1 First Post Sixth year Anniversary Fifth year Anniversary Fourth year Anniversary Third year Anniversary

eu posso indicar o site, este não é o local correcto para o indicar, quem poder dar uma ajuda que veja o site "adulto" que coloquei á venda.

 :obrigado:
Offline

STronic 
Elite
Mensagens 546 Gostos 8
Feedback +5

Troféus totais: 30
Trófeus: (Ver todos)
Mobile User Search Apple User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

http://****.com/wp-content/plugins/kk-star-ratings/images/

Estão aí as 3 imagens necessárias, é só alterar o fundo...
Offline

mygodess 
Membro
Mensagens 8 Gostos 0
Troféus totais: 12
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 2 Level 1 First Post Sixth year Anniversary Fifth year Anniversary Fourth year Anniversary Third year Anniversary

Boa , já entendi , agora tenho que editar o fundo destas três imagens .

 :obrigado: