1 reply [Last post]
cubedweller
Offline
newbie
Software Developer
Last seen: 6 years 38 weeks ago
Software Developer
Joined: 2008-02-23
Posts: 1
Points: 0

:shrug:

Trying to get this button to work -- I don't have the images hosted anywhere... just on my local machine, but... the button won't right-justif -- for the life of me I can't figure this out... anyone?

.leftimg {
position:absolute;
width:21px;
height:22px;
background: url('blue_button_left.gif') no-repeat;
top:0;
left:0;
}
.rightimg {
position:absolute;
width:21px;
height:22px;
background: url('blue_button_right.gif') no-repeat;
top:0;
right:0;
}
.middleimg {
position:absolute;
padding-left:22px;
padding-right:22px;
height:22px;
background: url('blue_button_middle.gif') repeat-x;
text-align:center;
line-height:24px;
font-size:10pt;
color:white;
font-family:Arial;
}

My Button

purewebdesigner
purewebdesigner's picture
Offline
Enthusiast
Washington DC
Last seen: 12 weeks 1 day ago
Washington DC
Timezone: GMT-4
Joined: 2007-04-22
Posts: 234
Points: 95

try this:

try this:

.middleimg {
width:200px;
margin:0 auto;
height:22px;
background: url('blue_button_middle.gif') repeat-x;
text-align:center;
line-height:24px;
font-size:10pt;
color:white;
font-family:Arial;
}

by adding a width (set it using % or em if not fixed)
and margin:0 auto; it should center for you.

Hope this helps, let us know if it does.

CSSExpression EngineHTMLWordpressCoffee

Personal Website: curtisscott.com
Follow Me on Twitter: twitter.com/curtisscott_com