Click here to Skip to main content
15,902,299 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating a Calculator using HTML,CSS and Javascript. I am trying to give it a stylish look. but a problem come in front of me.My Problem is when I click on any button then then complete set of button moves slightly from its position.This thing is happening after providing values to the buttons.When I have not provided any value then it runs without any problem.
I am providing you a link:click here to view jsfiddle link[]
The first one example is having with problem which i am saying about.and the later one is without values.(But working Correctly)
Thanks in advance
Posted

1 solution

The problem is the border-top of the buttons. I just added
border-top: solid 2px transparent; to .button

Also, for what it's worth, you can simplify that css quite a bit. You've got quite a few attributes that get repeated for many styles. You should put them into a style that they all inherit from, much like you have with (for example) the border-radius on the buttons.

Another observation - you really shouldn't be using those 5 spaces between buttons to position them. There's lots more that could be improved here, but I'll leave that as an exercise for the reader.

Here's a slightly more concise version:
http://jsfiddle.net/hnLEG/1/[^]
 
Share this answer
 
Comments
Anoop Kr Sharma 31-Jul-13 23:57pm    
thanx enhzflep for solving my problem.Really Deserve +5 from me.
enhzflep 1-Aug-13 2:10am    
You're welcome Anoop Kr Sharma, it's a pleasure. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900