Como alterar cor do link que aparece nas widgets sem alterar os demais links?
-
Uso o tema PRIMPRESS no http://www.camisasdogremio.net/ e gostaria de saber como faço para alterar a cor/fonte dos links que aparecem nas widgets (menus) sem alterar a cor dos demais links?
Sei que tenho que criar algo no .css, mas ainda não atinei, só consigo alterar todos.
Obrigado!
Att.
Diego Bretanha
-
Diego, o caminho é mesmo o .css pois assim pode falar o caminho para o .css aplicar o estilo. Mas para isso precisamos saber a estrutura (html) que seu widget esta imprimindo. Você pode colar isso aqui?
A ideia é fazer algo mais ou menos assim no .css:
#sidebar-1 .widget-text a { ... }
Veja se são estes os códigos:
<div id="secondary"> <div id="sidebar-1" class="sidebar"> <ul class="xoxo"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?><!--sidebar-1 widgets start--> <li id="recent-posts" class="widget"> <h2><?php _e('Recent Posts'); ?></h2> <ul> <?php wp_get_archives('type=postbypost&limit=10'); ?> </ul> </li> <li id="categories" class="widget"> <h2><?php _e('Categories'); ?></h2> <ul> <?php wp_list_categories('title_li='); ?> </ul> </li> <?php endif; ?><!--sidebar-1 widgets end--> </ul> </div><!--#sidebar-1--> <div id="sidebar-2" class="sidebar"> <div id="pp-search"> <?php include(TEMPLATEPATH . '/searchform.php'); ?> </div> <ul class="xoxo"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?><!--sidebar-2 widgets start--> <li id="calendar" class="widget"> <h2><?php _e('Calendar'); ?></h2> <div id="calendar_wrap"> <?php get_calendar(); ?> </div> </li> <li id="pages" class="widget"> <h2><?php _e('Pages'); ?></h2> <ul> <?php wp_list_pages('title_li='); ?> </ul> </li> <?php wp_list_bookmarks('class=widget'); ?> <li id="meta" class="widget"> <h2><?php _e('Meta'); ?></h2> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <?php wp_meta(); ?> </ul> </li> <?php endif; ?><!--sidebar-2 widgets end--> </ul> </div><!--#sidebar-2--> </div><!--#secondary-->
e o .css
/* Theme Name: PrimePress Theme URI: http://www.techtrot.com/primepress/ Description: A 3-column <strong>search engine optimized</strong> theme with a clean and content-centric design. Features easily customizable <strong>rotating header images</strong> and a <strong>custom stylesheet</strong> for personalizing the theme. Author: Ravi Varma Author URI: http://www.techtrot.com/ Version: 1.2.2 Tags: valid CSS, valid XHTML, fixed width, white, blue, widgets, three columns, custom header, right sidebar, widget ready, microformats */ /* http://meyerweb.com/eric/tools/css/reset/ */ /* v1.0 | 20080212 */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent;} ol, ul {list-style: none;} blockquote, q {quotes: none;} blockquote:before, blockquote:after, q:before, q:after {content: ''; content: none;} /* remember to define focus styles! */ :focus {outline: 0;} /* tables still need 'cellspacing="0"' in the markup */ table {border-collapse: collapse; border-spacing: 0;} body {font: 62.5%/1.3 verdana, 'Lucida Grande', arial, sans-serif; text-align:center; background:#fff; color:#111;} /*-----layout-----*/ #page {width:962px; margin:0 auto; text-align:left;} #header{width:960px; float:left; position:relative;} #container{width:920px; float:left; padding:0 20px; background:#fff;} #rotating{width:920px; float:left; padding:20px 0; border-top:1px solid #000000; border-bottom:1px solid #000000;} #primary{width:480px; float:left; padding:0 18px 0 0;} #secondary{width:421px; float:left;} #sidebar-1{border-left:1px solid #000000;} .sidebar{float:left; width:200px; padding:10px 0 0 10px;} #footer{width:920px; float:left; clear:both;} /*-----header-----*/ .homelink{font:small-caps bold 35px/1 'trebuchet ms', verdana, arial, sans-serif; letter-spacing:-0.5px; padding:40px 20px 10px 20px;} .homelink a{color:#444;} .homelink a:hover{color:#000; text-decoration:none;} .description{color:#666; margin-top:-10px; padding:0 0 10px 21px; font-size:13px; line-height:1; font-style:italic;} #skip a{padding:0.2em 0.3em; font-weight:bold; background:#e5e5e5; color:#444; display:block; text-decoration:none; position:absolute; top:0.5em; right:999em;} #skip a:first-letter{text-decoration:underline;} #skip a:hover{background:#dddddd;} /*-----main-menu*/ ul.menu{position:absolute; bottom:0; right:25px; padding:5px 10px 0;} ul.menu li{float:left; margin:0 0 0 5px; background:#000000; font:bold 11px/1 'trebuchet ms', arial, sans-serif;} ul.menu li a{display:block; color:#ffffff; padding:5px 10px;} ul.menu li a:hover{text-decoration:none; background:#00a0e6;} ul.menu li.current_page_item a, ul.menu li.current_page_item a:hover{color:#ffffff; background:#00a0e6;} /*-----Generic Styles-----*/ b, strong{font-weight:bold;} i, em, dfn{font-style:italic;} dfn{font-weight:bold;} abbr, acronym{border-bottom:1px solid #ddd;} sup, sub{font-size:0.7692em; line-height:1;} sup{vertical-align:super;} sub{vertical-align:sub;} del{text-decoration:line-through;} u, ins{text-decoration:underline;} pre, code, tt{font:1em/1.5385 consolas, 'Courier New', Courier, Monospace;} pre{margin:0 0 1.5385em; padding:0.7692em 10px; border:1px solid #ddd; overflow:auto;} hr{background:#ccc; color:#ccc; clear:both; float:none; width:100%; height:0.1em; margin:0 0 1.5385em; border:none;} blockquote{margin:0 0 1.5385em; padding:0 0 0 40px; color:#555; background:url('images/pp-quote.gif') no-repeat;} /*-----headings-----*/ h1, h2, h3, h4, h5, h6{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif; letter-spacing:-0.3px;} .entry-title, .page-title{font-size:2.2em; line-height:1; margin:0.9091em 0 0;} .page .entry-title, .page-template .entry-title{text-align:center;} .page-title{text-align:center; margin-bottom:0.9091em;} .sidebar h2{font-size:1.5em;} .entry-content h1, .entry-content h2{font-size:1.5385em; line-height:1; margin:1.5em 0 0.5em;} .entry-content h3{font-size:1.3846em; line-height:1.1111; margin:1.66665em 0 0.55555em;} .entry-content h4{font-size:1.2308em; font-weight:bold; line-height:1.25; margin:1.875em 0 0.625em;} .entry-content h5, .entry-content h6{font-size:1em; font-weight:bold; margin:2.30775em 0 0.76925em;} a{text-decoration:none; color:#ffffff;} a:hover{text-decoration:underline;} .entry-title a:hover, .entry-byline a:hover, .navigation a:hover{color:#000;} .entry-byline a{color:#777;} .entry-content a{} .entry-content a:hover{} /*-----content-----*/ .entry-content{font-size:1.3em; line-height:1.5385; margin:1.5385em 0 0;} .entry-content p{margin:0 0 1.5385em;} .entry-content address{margin:0 0 1.5385em; font-style:italic;} .looped .entry, .single .entry{border-bottom:1px dashed #00a0e6;} /*-----post info*/ .entry-byline{color:#777; font:italic 1.1em 'trebuchet ms', sans-serif;} .entry-byline address{display:inline;} .entry-meta{margin:2.4999em 0 0.8333em; font:italic 1.2em/1.6666 'trebuchet ms', sans-serif; color:#555;} /*-----lists*/ .entry-content ul, .entry-content ol{margin:0 0 1.5385em 30px;} .entry-content li{margin-bottom:0.4615em; line-height:1.5385;} .entry-content li ul, .entry-content li ol{margin:0.4615em 0 1.077em 30px;} .entry-content ul{list-style-type:square;} .entry-content li ul{list-style-type:circle;} .entry-content ol{list-style-type:decimal;} .entry-content ol ol{list-style-type:upper-alpha;} .entry-content dl{margin:0 0 1.5385em;} .entry-content dl dt{font-weight:bold;} .entry-content dd{margin:0 0 1.5385em;} /*-----images*/ .entry-content img{max-width:100%; height:auto;} img.alignleft, div.alignleft{margin:0 15px 3px 0; display:inline;} img.alignright, div.alignright{margin:0 0 3px 15px; display:inline;} .aligncenter, div.aligncenter {display:block; margin:0 auto 1.5385em;} img.border{padding:4px; border:1px solid #ccc; background:#eee;} .alignleft{float:left;} .alignright{float:right;} .center{text-align:center;} .wp-caption {text-align:center; padding-top:4px;} .wp-caption img {margin:0; padding:0; border:0 none;} .wp-caption p.wp-caption-text {color:#555; padding:4px; margin:0; font:italic 0.923em/1.6666 'trebuchet ms', verdana, sans-serif;} /*-----gallery*/ .entry-content .attachment a, .entry-content .gallery a, .entry-content .attachment a:hover, .entry-content .gallery a:hover {border:none;} .attachment img, .attachment-thumbnail, .entry-content .gallery img{padding:2px; border:1px solid #ccc;} .attachment img:hover, .attachment-thumbnail:hover, .entry-content .gallery img:hover{border:1px solid #888;} img.attachment-thumbnail{width:147px;} .attachment{text-align:center;} /*-----tables*/ .entry-content table{margin:0 0 1.5385em; border-collapse:collapse; border:1px solid #ccc; color:#444; width:80%;} .entry-content th{font-weight:bold; background:#ccc;} .entry-content th, .entry-content td{padding:0.2em 10px;} .entry-content td{border:1px solid #ccc;} .entry-content tbody tr:hover{background:#ddd;} .entry-content tfoot{background:#ddd;} /*-----sidebar-----*/ /*-----RSS feed*/ #pp-feed{height:32px; border-top:1px solid #aaa; border-bottom:1px solid #aaa; margin:0 0 1em 0; background:#ccc url(images/pp-rss2.png) no-repeat 2% 47%;} #pp-feed p{margin:0 0 0 65px; padding:8px 5px; font:bold 13px 'trebuchet ms', verdana, sans-serif;} /*-----search*/ #pp-search{height:24px; border-top:1px solid #ffffff; border-bottom:1px solid #ffffff; margin:0 0 1em 0; background:#3b3b3a; padding:6px 6px 6px 6px;} #s-input{border:0px solid #ffffff; margin-right:0px; font-size:12px; height:22px; padding:0px; vertical-align:top;} .entry #s-input{border-color:#ffffff;} #submit, #s-submit{border:0px solid #337ab7; background:#337ab7; color:#ffffff; cursor:pointer; font-size:12px; height:22px; font-weight:bold; font-variant:small-caps;} #submit:hover, #s-submit:hover{color:#ffffff;} #s-input, #submit, #s-submit{font-family:arial, sans-serif;} /*-----widgets*/ .widget {font-size:1.2em; line-height:1.5; margin:0 0 1.25em; padding:0.4166em 5px 0.4166em 5px; background:#eee;} .widget li{margin:0.1667em 0; padding:0 0 0 15px; color:#000000;} .widget h2{margin-bottom:3px; padding:0 0 0 3px; line-height:1.3; color:#000000; font-variant:small-caps; font-weight:bold;} .textwidget, .widget p{font-family:'trebuchet ms', 'lucida grande', arial, sans-seriff;} #recent-posts li, #recent-comments li, .widget_rss li{background: url(images/pp-bullet.gif) 0 0.55em no-repeat;} /*-----calendar*/ #calendar_wrap{margin:0.4166em auto 0;} #wp-calendar{width:94%; margin:0 auto; font-family:'trebuchet ms', 'lucida grande', arial, sans-seriff;} #wp-calendar caption{background:#aaa; font-size:1.0833em; font-weight:bold;} #wp-calendar th{background:#ddd;} #wp-calendar th, #wp-calendar td{text-align:center; padding:0.25em;} #wp-calendar td{font-size:0.9166em; color:#777;} #wp-calendar tfoot{background:#ddd;} #wp-calendar a{font-weight:bold;} /*-----navigation-----*/ .navigation{font-size:1.1em; text-align:center; padding:1.8181em 0;} .navleft, .gnavleft{float:left; width:50%; text-align:left;} .navright, .gnavright{float:right; width:50%; text-align:right;} .gnavigation{padding:0 0 2em;} /*-----footer-----*/ #footer{margin:0 0 0.8333em; border-top:1px solid #000000; border-bottom:1px solid #000000; padding:1.6666em 0; font:1.2em/1.6666 'trebuchet ms', verdana, snas-serif;} #footer .left{width:50%; float:left; text-align:left;} #footer .right{width:50%; float:right; text-align:right;} .clear{margin:0; padding:0; clear:both;} /*-----comments-----*/ #comments{width:480px;} .nocomments{text-align:center; padding:1.25em 0; font-size:1.6em; border-top:1px dashed #00a0e6;} #comments h3{font-size:2em; font-weight:normal; line-height:1;} h3.comments-number{margin:0 auto 1.5em; padding-top:1em; border-top:1px dashed #00a0e6;} h3#respond{margin:0 0 0.5em;} .commentlist{margin:0 0 4em;} .commentlist li{margin:0 0 1em; padding:0.5em 5px;} .comment-counter{font-size:1.3em; float:right;} .commentauthor{font:bold 1.5em/1 'trebuchet ms', arial, sans-serif;} .comment-meta{font:italic 1.1em 'trebuchet ms', arial, sans-serif; color:#777;} .comment-content{font-size:1.1em; line-height:1.5454; color:#333;} .comment-content p{margin:1.4545em 5px 1.4545em 0;} .comment-content pre{background:#fff; margin:0; border:none;} .comment-login {font:1.2em 'trebuchet ms', arial, sans-serif; margin-bottom:1.6666em;} .alt{background:#ececec;} .authorcomment{background:#ddd; border:1px solid #ccc;} .avatar{float:left; padding-right:7px;} /*-----commentforms*/ #commentform{margin:0 0 4em 0;} #commentform p{margin:0 0 1em 0;} #commentform textarea, #commentform input[type=text]{font:1.2em verdana, Courier, Monospace; padding:3px; border:1px solid #ccc; color:#666;} #commentform textarea:focus, #commentform input[type=text]:focus{color:#000; border-color:#888;} #commentform label{font-size:1em;} #commentform textarea{width:90%;} #commentform input[type=text]{width:45%;} #commentform #submit{height:30px; padding:3px 6px;} /*-----links-----*/ a{text-decoration:none; color:#0070C5;} a:hover{text-decoration:underline;} .entry-title a:hover, .entry-byline a:hover, .navigation a:hover{color:#000;} .entry-byline a{color:#777;} .entry-content a{} .entry-content a:hover{} #primary.page-template .entry-content a{text-decoration:none; font-weight:normal;} #primary.page-template .entry-content a:hover{text-decoration:underline;} #footer a:hover{} .gnavigation a:hover{border-bottom:none;}
up
Opa, desculpa a demora. Posta ai pro pessoal qual foi a solucao se possivel.
Não solucionei ainda… Estou aguardando ajuda… postei os códigos acima.
Continuo em busca da solução…
Cola isso no seu css e veja se os links do widget posts recentes é alterada:
#secondary .sidebar #recent-posts a { color: red; }
- O tópico ‘Como alterar cor do link que aparece nas widgets sem alterar os demais links?’ está fechado para novas respostas.