List Info

Thread: Re: YUI buttons, how to style them?




Re: YUI buttons, how to style them?
country flaguser name
United States
2008-03-30 12:17:11

Greg -

Try this CSS Rule:
.yui-button button {
    font-weight: bold;
}

FYI, I figured this out by using Firebug (www.getfirebug.com) and inspecting the element.. Then you see the CSS cascade of rules that can be changed..

Does that help?
Dav
 
Dav Glass
dav.glassyahoo.com
blog.davglass.com



+ Windows: n. - The most successful computer virus, ever. +
+ A computer without a Microsoft operating system is like a dog
without bricks tied to its head +
+ A Microsoft Certified Systems Engineer is to computing what a
McDonalds Certified Food Specialist is to fine cuisine +


----- Original Message ----
From: Greg Skluzacek <gskluzacekgmail.com>
To: ydn-javascriptyahoogroups.com
Sent: Sunday, March 30, 2008 9:46:37 AM
Subject: [ydn-javascript] YUI buttons, how to style them?

Hi all,

I'm worrking on an application that uses the YUI button controls, but I'm having issues styling them... I'm fairly new to CSS and new to YUI, so any help would be appreciated.

I'd like to be able to change the width of the button, and how much padding/margin are on the top/bottom/left/right on a button by button basis.&nbsp;I've read the button user guide section on skinning the button control ( http://developer.yahoo.com/yui/button/#skinning ) & the CSS Clases reference ( http://developer.yahoo.com/yui/button/#cssref ). I tried the follow css style

.yui-button { font-weight: bold; }

to make the text of all the buttons bold... here HTML markup for one of my buttons

<input name="get_rows_btn" id="get_rows_btn" type="button" value="get rows">

and here is the corresponding JavaScript

 function onButtonsReady() {
 &nbsp;...
&nbsp; ...
 &nbsp;
 &nbsp;var get_rows_btn = new YAHOO.widget.Button("get_rows_btn");
&nbsp; 
&nbsp; get_rows_btn.addListener("click", getrows);&nbsp;
 }
&nbsp;
 ;YAHOO.util.Event.onContentReady("manage", onButtonsReady);

Here is my code so far: https://maccodemonkey.sslpowered.com/test/manage8.html

Any help would be much appreciated!

 ;

Also, any  comments or suggestions on how to improve the JavaScript, CSS, HTML markup or overall design would be appreciated too.

&nbsp;

Regrads,

-- Greg


__._,_.___
.

__,_._,___
Re: YUI buttons, how to style them?
country flaguser name
United States
2008-03-30 19:59:39

Dav,

Thanks for the help.

I got Firebug, this looks like a really powerful tool! I will
definitely have to spend some time tinkering with it. Thanks.

Then to style a specific button created from markup with a specific
ID, one can use

#ID button {style...}

-- Greg

--- In ydn-javascript%40yahoogroups.com">ydn-javascriptyahoogroups.com, Dav Glass <dav.glass...>
wrote:
>
&gt; Greg -
>
> Try this CSS Rule:
&gt; .yui-button button {
> font-weight: bold;
&gt; }
>
> FYI, I figured this out by using Firebug (www.getfirebug.com) and
inspecting the element.. Then you see the CSS cascade of rules that
can be changed..
>
> Does that help?
&gt; Dav
>
> Dav Glass
&gt; dav.glass...
>; blog.davglass.com
>
>
>
> + Windows: n. - The most successful computer virus, ever. +
> + A computer without a Microsoft operating system is like a dog
> without bricks tied to its head +
> + A Microsoft Certified Systems Engineer is to computing what a
> McDonalds Certified Food Specialist is to fine cuisine +
>
> ----- Original Message ----
>; From: Greg Skluzacek <gskluzacek...>
> To: ydn-javascript%40yahoogroups.com">ydn-javascriptyahoogroups.com
> Sent: Sunday, March 30, 2008 9:46:37 AM
> Subject: [ydn-javascript] YUI buttons, how to style them?
&gt;
>
> <!--
>
> #ygrp-mkp{
> border:1px solid #d8d8d8;font-family:Arial;margin:14px
0px;padding:0px 14px;}
&gt; #ygrp-mkp hr{
> border:1px solid #d8d8d8;}
> #ygrp-mkp #hd{
>; color:#628c2a;font-size:85%;font-weight:bold;line-
height:122%;margin:10px 0px;}
&gt; #ygrp-mkp #ads{
&gt; margin-bottom:10px;}
> #ygrp-mkp .ad{
>; padding:0 0;}
> #ygrp-mkp .ad a{
> color:#0000ff;text-decoration:none;}
&gt; -->
&gt; Hi all,
>; I'm worrking on an application that uses the YUI button controls,
but I'm having issues styling them... I'm fairly new to CSS and new
to YUI, so any help would be appreciated.
> I'd like to be able to change the width of the button, and how
much padding/margin are on the top/bottom/left/right on a button by
button basis. I've read the button user guide section on skinning
the button control (
http://developer.yahoo.com/yui/button/#skinning ) & the CSS Clases
reference ( http://developer.yahoo.com/yui/button/#cssref ). I tried
the follow css style
&gt; .yui-button { font-weight: bold; }
> to make the text of all the buttons bold... here HTML markup for
one of my buttons
> <input name=";get_rows_btn" id="get_rows_btn" type=";button&quot;
value=&quot;get rows">
> and here is the corresponding JavaScript
> function onButtonsReady() {
> ...
> ...
>
> var get_rows_btn = new YAHOO.widget.Button("get_rows_btn&quot;);
&gt;
> get_rows_btn.addListener(";click";, getrows);
> }
>
> YAHOO.util.Event.onContentReady("manage", onButtonsReady);
&gt; Here is my code so far:
https://maccodemonkey.sslpowered.com/test/manage8.html
> Any help would be much appreciated!
>
> Also, any comments or suggestions on how to improve the
JavaScript, CSS, HTML markup or overall design would be appreciated
too.
>
> Regrads,
> -- Greg
>;

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )