Jump to content

1px by 1px


PrateekSaxena

Recommended Posts

Hello,I am trying to make a <DIV> with both height and width of 1px and color blue but I am not able to do so. could some one please give me a code so that I can make such a DIV?

Link to comment
Share on other sites

You might try this:

<div style="width: 1px; height: 1px; overflow: hidden; background-color: blue;"></div>

The overflow: hidden; was added to appease IE6.

Link to comment
Share on other sites

Thank you so much Jesh, it worked perfectly both on FF 2.0 and IE 6.0I was missing out on overflow :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...