473,406 Members | 2,707 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,406 software developers and data experts.

Button and Anchor Styling. They differ ...

Hello,

In a page I have:
1. An input (type="submit") button that submits a form.
2. An anchor that cancels the form submission and redirects the user
to a page.

I am trying to make both look the same having a padding a background
color.

I tested in Firefox and in IE but in both cases the two don't look the
same.
I am also using a Reset.css.

I posted an example with the HTML and CSS code here:
http://www.27lamps.com/Labs/Buttons/Buttons.html

Could someone help me out with this?

Thanks,
Miguel
Jun 27 '08 #1
3 3425
Scripsit shapper:
1. An input (type="submit") button that submits a form.
Fine.
2. An anchor that cancels the form submission and redirects the user
to a page.
Huh? There is nothing to be cancelled. You just have a link, and when a
user follows the link, he at least temporarily leaves the linking page.
Any link will do that.
I am trying to make both look the same having a padding a background
color.
Why should they look similar when they do quite different jobs?

(Besides, making a link and a button look the same is a rather desperate
effort. Both of them may have all kinds of default rendering features.)

If you make the link look like a button, people will mistake it as a
Reset button (effectively, "destroy form data" button), and if they know
how such buttons almost always "work", they will avoid them like plague.
Once in a decade, they will click on it and expect it to reset all form
fields to their initial values.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jun 27 '08 #2
On Jun 18, 4:43*pm, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
Scripsit shapper:
1. An input (type="submit") button that submits a form.

Fine.
2. An anchor that cancels the form submission and redirects the user
to a page.

Huh? There is nothing to be cancelled. You just have a link, and when a
user follows the link, he at least temporarily leaves the linking page.
Any link will do that.
I am trying to make both look the same having a padding a background
color.

Why should they look similar when they do quite different jobs?

(Besides, making a link and a button look the same is a rather desperate
effort. Both of them may have all kinds of default rendering features.)

If you make the link look like a button, people will mistake it as a
Reset button (effectively, "destroy form data" button), and if they know
how such buttons almost always "work", they will avoid them like plague.
Once in a decade, they will click on it and expect it to reset all form
fields to their initial values.

--
Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
Hi,

I realized now the anchor was redirecting to Google ... that was a
mistake.
I have a table which display various records ... When I click in a
record I redirect the user to a form in a new page with 2 buttons:

Save Save the data
Cancel Don't save the data and get back to list

I think it is intuitive or not?

I now change the Cancel from an anchor to a button ... there is only
one small problem:
In Firefox I get a space between each button when they should be
together ... in IE it shows ok. Any idea why?

The URL is:
http://www.27lamps.com/Labs/Buttons/Buttons.html

Thanks,
Miguel
Jun 27 '08 #3
shapper schrieb:
In Firefox I get a space between each button when they should be
together ... in IE it shows ok. Any idea why?
Default style sheet, I guess. Try setting all the relevant attributes
like padding and margin yourself.
Jun 27 '08 #4

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

Similar topics

6
by: Marek Mänd | last post by:
Can the <button><img></button> mutated via CSS so, that the inner image of <BUTTON> would entirely visually become the button itsself - I mean without the outer elements borders and so... ...
4
by: deko | last post by:
I use named anchors to take users to specific parts of a long page. But I want to add some processing and do some things with my nav bar when users go to certain sections delineated by named...
9
by: Ray Muforosky | last post by:
Hello, Is there a way to render a text or button tag without a sunken or raised surface respectively. Ray
4
by: Arif Çimen | last post by:
Hi to everybody, I have chnged a button text in design mode. But After compiling and executing the program the text of the button do not change to new value. Any Ideas? Thaks for helps.
3
by: rpaterso47 | last post by:
Hello, I am trying to insert a background image into URLs that link to pages outside our intranet and thus when clicked open a new window. The image used is the common one seen on many sites,...
2
by: gvrajkumar | last post by:
Hi We are developing an Ajax based application. In this application the URL is fixed and as user navigates on the application we will change Anchor on the URL so that user can bookmark the url...
9
by: shapper | last post by:
Hello, Is there a way to make the browse button an image? Thanks, Miguel
1
by: Forumtroll | last post by:
I have a Web User Control that parses an XML file and renders a Form based on the XML. The problem is that I create a button on the bottom of the form that will fire off a subscribeable event, but...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
I placed a button on a form menustrip for the purpose of causing the horizontal scrollbar of my form to appear so that I can access controls outside of the form's current view (the controls are...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.