469,315 Members | 1,802 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

How to make Text or button tag with plain flat look ?

Hello,

Is there a way to render a text or button tag without a sunken or
raised surface respectively.

Ray

Aug 24 '05 #1
9 65957
Yes, there are CSS style attributes that apply. For example, you can
specify the border color, border thickness, color of the button, font
on the button...really just about everything. Just give it
border:solid; and it should not have the raised look anymore.

Aug 24 '05 #2
This is about as flat as you can get it :

<input type="button" value="Button Text" style="border-style:none;" />

Aug 24 '05 #3
Thanks, that's what I was looking for.

Aug 24 '05 #4
Christian Winter wrote:
This is about as flat as you can get it :

<input type="button" value="Button Text" style="border-style:none;" />


In some browsers you can't modify the style of some elements - like inputs.

--
Rob
Aug 25 '05 #5

RobG schrieb:
Christian Winter wrote:
This is about as flat as you can get it :

<input type="button" value="Button Text" style="border-style:none;" />


In some browsers you can't modify the style of some elements - like inputs.


What browsers would that be?

It is valid XHTML and if it doesn't work in a browser that is not my
problem but the browsers problem, IMHO.

Aug 26 '05 #6
"Christian Winter" wrote:

RobG schrieb:
Christian Winter wrote:
This is about as flat as you can get it :

<input type="button" value="Button Text" style="border-style:none;" />
In some browsers you can't modify the style of some elements - like inputs.


What browsers would that be?


- Safari

- Older versions of Netscape and IE

- Any non-graphical browser
It is valid XHTML
XHTML has nothing to do with it. Try CSS. The CSS2 specification says:
Note. Notably for HTML, user agents may render borders for <<<
certain elements (e.g., buttons, menus, etc.) differently <<<
than for "ordinary" elements. <<<

and if it doesn't work in a browser that is not my problem but the
browsers problem, IMHO.


No, it really is your problem. Take a look at item #1 on this page:
<http://www.webpagesthatsuck.com/biggest-web-design-mistakes-in-2004.html>

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Aug 26 '05 #7

Philip Ronan schrieb:
No, it really is your problem. Take a look at item #1 on this page:
<http://www.webpagesthatsuck.com/biggest-web-design-mistakes-in-2004.html>


I write valid HTML and CSS. This is the only way to ensure that there
at least is some standard. While I make every effort to accomodate all
browsers, I do not care if they cannot interpret valid HTML or CSS. I
also feel that a graphical gimmick such as the one above is low on my
list of priorities to ensure working in all browsers.

Aug 26 '05 #8
RobG wrote:
This is about as flat as you can get it :

<input type="button" value="Button Text" style="border-style:none;" />


In some browsers you can't modify the style of some elements - like inputs.


Right; this style attribute only hurts when it works.

(When it works, it prevents the button from looking like a button and
thereby misleads the user.)

P.S. The thread is off-topic: it is about CSS, not HTML. On the HTML
side, it is worth noting that <input type="button"> should never be used
as a static part of a document but only as generated by client-side
scripting. The reason is obvious if you think what happens when
client-side scripting is disabled.
Aug 26 '05 #9
On Fri, 26 Aug 2005, Philip Ronan wrote:
"Christian Winter" wrote:
[re. styling of buttons:]
and if it doesn't work in a browser that is not my problem but the
browsers problem, IMHO.


No, it really is your problem. Take a look at item #1 on this page:
<http://www.webpagesthatsuck.com/biggest-web-design-mistakes-in-2004.html>


But surely this problem/mistake arises when the button styling *does*
work - not when it doesn't?

Users of a particular browser already know what a button looks like on
their browser (whereas a web document author typically does not).
The user has seen them before, many a time, and recognises them when
they see them. (Much the same principle applies for any "user
control" on a web page, in fact).

Confusion and mystery only sets in when the author contrives to style
them so differently than users are accustomed to, that they no longer
recognise them, or, worse, mistake them for something else. When the
author's styling proposal fails, the user isn't presented with that
dilemma.

Don't get me wrong: I've nothing against authors proposing a
particular presentation in general - in fact, I'm all for it, given
the horrible default presentation which most browsers offer. It's
only when authors contrive to camouflage something which the user is
meant to be able to use, such as a link, or a form "control", to the
extent that a user can no longer recognise it for what it is, that I
get crabby.

Aug 26 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Peter Scott | last post: by
3 posts views Thread by AaaaM | last post: by
5 posts views Thread by Asha | last post: by
2 posts views Thread by Peted | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.