theniteowl
Programmer
Hi All,
I am trying to create an outer container with a gray background that will contain text and will grow in width and size accomodating the size/style of the text.
Inside this container I am trying to absolutely position single pixels of a different color.
I have a border around the outer container. I want the colored pixel to sit on top of the border to the left and right of the container so I created two elements, one with the setting left: -1px; top: -1px; the other with right: -1px; top: -1px;
The -1 is to position the element on top of the border rather than inside it.
There seem to be two problems with this. First, I cannot get a single pixel, it always seems to insist on a minimum of two. The second is that depending on the total width in pixels the container ends up being the right placed pixel can be off by one pixel in it's placement. If the size in pixels of the container is an odd number the pixel is sitting inside the border and if it is an even number it sits on the border as it should.
Is this an IE thing? Is there a better approach?
I can accomodate two pixel height by tweaking the rest of the css but having the placement shift by one pixel is a problem.
Stamp out, eliminate and abolish redundancy!
I am trying to create an outer container with a gray background that will contain text and will grow in width and size accomodating the size/style of the text.
Inside this container I am trying to absolutely position single pixels of a different color.
I have a border around the outer container. I want the colored pixel to sit on top of the border to the left and right of the container so I created two elements, one with the setting left: -1px; top: -1px; the other with right: -1px; top: -1px;
The -1 is to position the element on top of the border rather than inside it.
There seem to be two problems with this. First, I cannot get a single pixel, it always seems to insist on a minimum of two. The second is that depending on the total width in pixels the container ends up being the right placed pixel can be off by one pixel in it's placement. If the size in pixels of the container is an odd number the pixel is sitting inside the border and if it is an even number it sits on the border as it should.
Is this an IE thing? Is there a better approach?
I can accomodate two pixel height by tweaking the rest of the css but having the placement shift by one pixel is a problem.
Stamp out, eliminate and abolish redundancy!