3

ie browser has a checkbox alignment problem actully ie take default size of checkbox which is width 20px and height 20px but other browser does not take this property so i want to change the size of input box

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<style >

*{margin:0px; height:0}
.jitu {width:40px; height:40px;}

</style>


</head>

<body>

<input type="checkbox" class="jitu" size="10" />


</body>
</html>
1
  • If you're only looking for cross browser consistency, take a peek at Formalize.me formalize.me Commented Feb 17, 2012 at 13:58

3 Answers 3

1

Clearly Quotes

size

The initial size of the control. This value is in pixels unless the value of the type attribute is text or password, in which case, it is an integer number of characters. Starting in HTML5, this attribute applies only when the type attribute is set to text, search, tel, url,email, or password;
otherwise it is ignored. In addition, the size must be greater than zero. If you don't specify a size, a default value of 20 is used.

Sign up to request clarification or add additional context in comments.

Comments

0

put the check box in the container and give the height/width to that contianer..

*{margin:0px; height:0}
.jitu {width:40px; height:40px;}


<div class="jitu">
<input type="checkbox"  size="10" />
</div>

Once you've set the height and width of the container -- you can place the checkbox where ever you want withing the container.. with margin for the checkbox..

1 Comment

i want of increase the size of checkbox
0

i want to change the size of input box

You have misunderstood what the size attribute specifies for an input. It is not a specifier of physical length; it is a specifier of how many characters of input data is shown on the control.

From the HTML specification for the size attribute for input:

The size attribute gives the number of characters that, in a visual rendering, the user agent is to allow the user to see while editing the element's value.

The checkbox input type does not recognise a size specification, because the data doesn't have different sizes.

To change the appearance of the element, you need to alter its style using CSS.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.