473,396 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

is there such an animal as er... text background width?

I like some css anchor to button stuff posted by someone a while back,
but want the buttons to be the same width. How can I get the anchor
for 'test' and 'longerTest' to be the same width when displayed?
CSS= <style type="text/css>
..button:link, .button:visited {
color: ButtonText;
font: ButtonText;
background-color: ButtonFace;
padding: 3px 15px;
font: small-caption;
border: outset 1px;
cursor: default;
text-decoration: none;
}
..button:active {
border-style: inset;
}
..button:hover {
border: outset 2px;
padding: 3px 15px;
}
</style>HTML=

<a href="./index.php?screen=test" class="button">test</a><br />
<a href="./index.php?screen=longerTest"
class="button">longerTest</a><br />
Jul 20 '05 #1
8 6353
In article <33**************************@posting.google.com >, bg342
@yahoo.com says...
I like some css anchor to button stuff posted by someone a while back,
but want the buttons to be the same width. How can I get the anchor
for 'test' and 'longerTest' to be the same width when displayed?
CSS=
<style type="text/css>
.button:link, .button:visited {

What's this? color: ButtonText; and this: font: ButtonText; and this?? background-color: ButtonFace;
padding: 3px 15px; this? font: small-caption;
border: outset 1px; .... <a href="./index.php?screen=test" class="button">test</a><br />
<a href="./index.php?screen=longerTest"
class="button">longerTest</a><br />


Something like:

..buttons a:link,
..buttons a:visited {
background: #DDD;
border: outset 2px black;
color: black;
display: block;
margin: 3px;
padding: 3px 15px;
text-decoration: none;
width: 10em;
}
..buttons a:active {
border-style: inset;
}
..buttons a:hover {
border: outset 2px #AAA;
background: #EEE;
}

<div class="buttons">
<a href="./index.php?screen=test">test</a>
<a href="./index.php?screen=longerTest">longerTest</a>
</div>

Jul 20 '05 #2
Jacqui or (maybe) Pete <po****@spamcop.net> wrote in message news:<MP***********************@news.CIS.DFN.DE>.. .
In article <33**************************@posting.google.com >, bg342
@yahoo.com says...
I like some css anchor to button stuff posted by someone a while back,
but want the buttons to be the same width. How can I get the anchor
for 'test' and 'longerTest' to be the same width when displayed?
>>CSS=

<style type="text/css>
.button:link, .button:visited {

What's this?
color: ButtonText;

and this:
font: ButtonText;

and this??
background-color: ButtonFace;
padding: 3px 15px;

this?
font: small-caption;
border: outset 1px;

...
<a href="./index.php?screen=test" class="button">test</a><br />
<a href="./index.php?screen=longerTest"
class="button">longerTest</a><br />


Something like:

.buttons a:link,
.buttons a:visited {
background: #DDD;
border: outset 2px black;
color: black;
display: block;
margin: 3px;
padding: 3px 15px;
text-decoration: none;
width: 10em;
}
.buttons a:active {
border-style: inset;
}
.buttons a:hover {
border: outset 2px #AAA;
background: #EEE;
}

<div class="buttons">
<a href="./index.php?screen=test">test</a>
<a href="./index.php?screen=longerTest">longerTest</a>
</div>


....>>>Thanks but, No, adding the width:10em; does nothing!
Jul 20 '05 #3
In article <33**************************@posting.google.com >, bg342
@yahoo.com says...
Jacqui or (maybe) Pete <po****@spamcop.net> wrote in message news:<MP***********************@news.CIS.DFN.DE>.. .
In article <33**************************@posting.google.com >, bg342
@yahoo.com says...
I like some css anchor to button stuff posted by someone a while back,
but want the buttons to be the same width. How can I get the anchor
for 'test' and 'longerTest' to be the same width when displayed?
>>>CSS=

snip non-css
Something like:
.... snip working example
...>>>Thanks but, No, adding the width:10em; does nothing!


No, it wouldn't. You can't set width on an inline element (padding &
margin are fine). That's why I did a bit more than "add width:10em".

See:

http://porjes.haxorz.org/one.html

Jul 20 '05 #4
Jacqui or (maybe) Pete <po****@spamcop.net> wrote in message news:<MP************************@news.CIS.DFN.DE>. ..
In article <33**************************@posting.google.com >, bg342
@yahoo.com says...
Jacqui or (maybe) Pete <po****@spamcop.net> wrote in message news:<MP***********************@news.CIS.DFN.DE>.. .
In article <33**************************@posting.google.com >, bg342
@yahoo.com says...
> I like some css anchor to button stuff posted by someone a while back,
> but want the buttons to be the same width. How can I get the anchor
> for 'test' and 'longerTest' to be the same width when displayed?
> >>>CSS=
snip non-css
Something like:

... snip working example

...>>>Thanks but, No, adding the width:10em; does nothing!


No, it wouldn't. You can't set width on an inline element (padding &
margin are fine). That's why I did a bit more than "add width:10em".

See:

http://porjes.haxorz.org/one.html


Got it...thanks a million.
Jul 20 '05 #5
"Jacqui or (maybe) Pete" <po****@spamcop.net> wrote in message >
.... snip ...

...>>>Thanks but, No, adding the width:10em; does nothing!


No, it wouldn't. You can't set width on an inline element (padding &
margin are fine). That's why I did a bit more than "add width:10em".


If you want them left-to-right on one line, add "float:left" to the style.

Jul 20 '05 #6
Jacqui or (maybe) Pete <po****@spamcop.net> writes:
What's this?
color: ButtonText;

A CSS2 system color name.
and this:
font: ButtonText;

An error; congratulations. :)
and this??
background-color: ButtonFace;

A CSS2 system color name.
this?
font: small-caption;


A CSS2 system font name.

--
<!DOCTYPO html>
Jul 20 '05 #7
In article <3f********@10.10.0.241>, st***********@compuware.com says...
"Jacqui or (maybe) Pete" <po****@spamcop.net> wrote in message >
... snip ...

...>>>Thanks but, No, adding the width:10em; does nothing!


No, it wouldn't. You can't set width on an inline element (padding &
margin are fine). That's why I did a bit more than "add width:10em".


If you want them left-to-right on one line, add "float:left" to the style.

Well, he had a <br> between them so I figure he didn't !
Jul 20 '05 #8
In article <m3************@email.bednarz.nl>, do********@wanadoo.nl
says...
Jacqui or (maybe) Pete <po****@spamcop.net> writes:
What's this?
color: ButtonText;


A CSS2 system color name.

Quite right - thank you for the correction.
Jul 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: no0bodyhome | last post by:
One of the properties I have is: border-top-width: 30px I'd like to put some text on this border; align it and such. It is part of more complicated floating column text-box I'm working on...
4
by: anatushi | last post by:
Hi, im looking for help on how to add a text fader to my website, usually i'm working with css but in this case i need to add java script to make it work, that wasn't the problem but somehow it...
1
by: Mickey | last post by:
Hi, I have a script which works in both IE but is sluggish in Firefox. The script is a simple text scroller. It works perfectly in IE however in Firefox, the text scroll slower and eventually...
4
by: lindsey.crocker | last post by:
I have this links list with background images set on them which changes when they roll over. The <td> is set valign="middle" however as soon as you apply the rollover to the link, the text jumps...
4
by: sweep | last post by:
Hi there, I have a problem with some CSS I'm writing and I was looking for a little help. I have a nav bar at the top and left side of my page in CSS which work fine. The remaining space has a...
14
by: Stefan Mueller | last post by:
With the following code I can add a new row to an existing table. That really works great. Many thanks to all who helped me so far. But my problem is that the added cells do somehow not have the...
2
by: george.leithead | last post by:
Hi all, I have a very strange problem! In following Web page (which is generated from a CMS System), the navigation to the left 'dissapears' when you roll the mouse over the links? It does not...
2
by: TyIzaeL | last post by:
This problem I'm having has me stumped. What is happening is I have a three column layout for a clan web portal and text in the left/right columns spills out of the side if the line is long enough....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.