ank9
asked on
CSS class for button
My HTML designer has given me the following code for a button
[code]
<p class="gtb_btnImgGrp searchBtns">
<a href="contact_add.html" class="gtb_btn">
<span class="gtb_btnImgStart">&n bsp;</span >
<span class="gtb_btnImgStretch"> Search</sp an>
<span class="gtb_btnImgEnd">&nbs p;</span>
</a>
</p>
[/code]
following are the corresponding CSS classes
[code]
.gtb_form p.gtb_btnImgGrp span {display:inline; float:none; font-size:10px}
#searchPanel p.searchBtns {text-align: right}
gtb_btn {position:relative; width:auto;padding:1px 0; text-transform: uppercase; font-size: 10px !important; background: none; cursor: pointer;line-height:10px; overflow: visible; text-decoration:none; color:#333;display:inline- block}
.gtb_btn * {z-index: 100;/*margin: 1px 0;*/;}
.gtb_btn span {padding: 9px 5px;width: auto; white-space:no-wrap;line-h eight: 30px; font-size: 10px}
.gtb_btn img {border:0; display: block; position: absolute; top:8px;z-index:200}
/* Image Buttons */
.gtb_btn .gtb_btnImgStart, .gtb_btn .gtb_btnImgEnd {padding: 9px 2px}
.gtb_btn .gtb_btnImgStretch {background: url(../images/buttons.png) 0 -35px repeat-x; margin: auto -3px;}
.gtb_btn .gtb_btnImgStart {background: url(../images/buttons.png) 0 0 no-repeat}
.gtb_btn .gtb_btnImgEnd {background: url(../images/buttons.png) 0 -70px no-repeat}
[/code]
Now I need to create a button in my JSP with the same look and feel
<input type="button" value="Save" />
Can someone please let me know how to create a CSS class, which I can use to show the same look and feel to the user. I want to do something like
<input type="button" value="Save" class="saveClass" /> and have the same look an feel of the button
Thank you
[code]
<p class="gtb_btnImgGrp searchBtns">
<a href="contact_add.html" class="gtb_btn">
<span class="gtb_btnImgStart">&n
<span class="gtb_btnImgStretch">
<span class="gtb_btnImgEnd">&nbs
</a>
</p>
[/code]
following are the corresponding CSS classes
[code]
.gtb_form p.gtb_btnImgGrp span {display:inline; float:none; font-size:10px}
#searchPanel p.searchBtns {text-align: right}
gtb_btn {position:relative; width:auto;padding:1px 0; text-transform: uppercase; font-size: 10px !important; background: none; cursor: pointer;line-height:10px; overflow: visible; text-decoration:none; color:#333;display:inline-
.gtb_btn * {z-index: 100;/*margin: 1px 0;*/;}
.gtb_btn span {padding: 9px 5px;width: auto; white-space:no-wrap;line-h
.gtb_btn img {border:0; display: block; position: absolute; top:8px;z-index:200}
/* Image Buttons */
.gtb_btn .gtb_btnImgStart, .gtb_btn .gtb_btnImgEnd {padding: 9px 2px}
.gtb_btn .gtb_btnImgStretch {background: url(../images/buttons.png)
.gtb_btn .gtb_btnImgStart {background: url(../images/buttons.png)
.gtb_btn .gtb_btnImgEnd {background: url(../images/buttons.png)
[/code]
Now I need to create a button in my JSP with the same look and feel
<input type="button" value="Save" />
Can someone please let me know how to create a CSS class, which I can use to show the same look and feel to the user. I want to do something like
<input type="button" value="Save" class="saveClass" /> and have the same look an feel of the button
Thank you
Whay can't you use the same HTML for your button as that for your designer's button?
ASKER
thanks for your reply.
How do I apply it to
<input type="button" >
I need a button so that I can capture onclick events
How do I apply it to
<input type="button" >
I need a button so that I can capture onclick events
ASKER
Actually, I'll be using a documentum control and not HTML button
<dmf:button name="abc" cssclass="ss" />
This control has an attribute called "cssclass" where I can specify my CSS class.
So I need just one CSS class although I am free to add other tags before or after dmf button tag.
<dmf:button name="abc" cssclass="ss" />
This control has an attribute called "cssclass" where I can specify my CSS class.
So I need just one CSS class although I am free to add other tags before or after dmf button tag.
ASKER
I tried this
<p class="gtb_btnImgGrp searchBtns">
<a href="contact_add.html" class="gtb_btn">
<span class="gtb_btnImgStart">&n bsp;</span >
<span class="gtb_btnImgStretch"> <input type="button" value="test" /></span>
<span class="gtb_btnImgEnd">&nbs p;</span>
</a>
</p>
but this puts a HTML button on top of the CSS generated look and feel
<p class="gtb_btnImgGrp searchBtns">
<a href="contact_add.html" class="gtb_btn">
<span class="gtb_btnImgStart">&n
<span class="gtb_btnImgStretch">
<span class="gtb_btnImgEnd">&nbs
</a>
</p>
but this puts a HTML button on top of the CSS generated look and feel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No worries - glad to help.