|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
XHTML 1.1 and DIV 1 pixel in heightThe general question is: "Is it possible to achieve a DIV that is 1 pixel in
height?" Keep in mind that I have to use XHTML 1.1 DOCTYPE. All I did in HTML 4 to make this does not help. I.e. even if I set the font-size to 1px and declare a style attribute height:1px my div is 2 pixels tall. Up to now I managed to get a table cell (TD) 1 pixel in height. But TD is not convenient in my case. Thanks for any suggestions in advance. -- Eugene U. Zverev, Senior Programmer P.S. no thanks for ones like "try to use an image". Well there must be somehow, this dude has sold pixels at $1.00 each to raise
funds he claims are for school but once the story hit "the news" I can't load his page... http://www.google.com/search?q=www.milliondollarhomepage.com <%= Clinton Gallagher METROmilwaukee (sm) "A Regional Information Service" NET csgallagher AT metromilwaukee.com URL http://metromilwaukee.com/ URL http://clintongallagher.metromilwaukee.com/ Show quoteHide quote "e_zverev" <ezve***@discussions.microsoft.com> wrote in message news:4073119E-4FD9-414C-A7D7-80AD8EC7DAA0@microsoft.com... > The general question is: "Is it possible to achieve a DIV that is 1 pixel > in > height?" > Keep in mind that I have to use XHTML 1.1 DOCTYPE. > > All I did in HTML 4 to make this does not help. I.e. even if I set the > font-size to 1px and declare a style attribute height:1px my div is 2 > pixels > tall. > > Up to now I managed to get a table cell (TD) 1 pixel in height. But TD is > not convenient in my case. > > Thanks for any suggestions in advance. > -- > Eugene U. Zverev, > Senior Programmer > > P.S. no thanks for ones like "try to use an image". Hi
...hey, did only I hear someone cry: "let's stay productive!"? I have got tons of ideas but no solution. -- Eugene U. Zverev, Senior Programmer e_zverev wrote:
> The general question is: "Is it possible to achieve a DIV that is 1 pixel in What about the very old approach to use a transparent gif (png if you > height?" > Keep in mind that I have to use XHTML 1.1 DOCTYPE. prefere) 1 px tall and large? Is that stretching to 2px as well? I have not the time to test it, but I wouldn't believe that ;-) HTH, Hi man
Didn't I ask not to suggest to use images? As I said, the easiest way I found is the table with 1 pixel height cells (TDs). I need a simplier solution, not more complex one. .....aaarrggggghh. e_zverev wrote:
> Didn't I ask not to suggest to use images? You didn't mention such a constraint before ;-)> As I said, the easiest way I found is the table with 1 pixel height cells What's complex on using a transparent gif? Now, if I would have> (TDs). I need a simplier solution, not more complex one. suggested you to write your own browser, that would have been complex! :-) Apart the joke, why you don't get a DIV with an height 1px? Could youplease post an example code? Did you set the border? > You didn't mention such a constraint before ;-) It was in P.S. in the original question: "P.S. no thanks for ones like "try to use an image"." Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html runat="server" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Page</title> </head> <body> <div style="width:100px; height:1px; background-color:Red; font-size:1px"></div> </body> </html> -- Eugene U. Zverev, Senior Programmer and the problem is?
It renders fine on firefox (1.5) IE (6 on XP) seems to render it two pixels tall --- is this your issue? try <div style="overflow:hidden; width:100px; height:1px; background-color:Red; "></div> instead hope this helps -- addup -- Hi
Yes, the problem was that it was 2 pixels tall. You solved it. Overflow:hidden is the thing. Thanks! -- Eugene U. Zverev, Senior Programmer e_zverev wrote:
> It was in P.S. in the original question: "P.S. no thanks for ones like "try A P.S. in the (and at the end of) signature is not exactly a place where > to use an image"." someone would probably look for constraints, anyway ;-)
Inheriting from the TreeNode class
GridView "visible=False" data items not accessible? programattically Website on a website. Menu Control and Page Validation Dependent GridViews And CommandArguments Set visibility of label in itemtemplate of repeater control VS 2005 Validator controls strange question about DropDownList Dropdownlist causes blank screen Adding errors by hand to a validationsummary? |
|||||||||||||||||||||||