Alternative to <td nowrap>

I found this link to be very helpful for dealing with nowrap.

This may seem trivial but interesting. In the world of compliance with XHTML 1.0 the best approach I have found to the nowrap attribute is in CSS white-space attribute, examples …

<td style="white-space: nowrap;">
<a style="white-space: nowrap;">

Posted in CSS, HTML. Tags: , . Leave a Comment »

Image(img) doesn’t show up on initial page load, FireFox

Here is the tag <img src=”images/exampleLogo.gif” />, what is wrong with it? Well, it depends on the browser and DOCTYPE and CSS being used. In this case I was using FireFox , DOCTYPE and some CSS to center my DIV on the screen. The result was that using the img tag without the width and height defined resulted in the image not showing up unless I refreshed the screen. I have had this same issue with Javascript img rollover scripts as well. The reason this happens is because the width and height are not defined.

Does not work:
<img src=”images/exampleLogo.gif” />

<img src=”images/exampleLogo.gif” width=”100″ height=”30″ />

The DTD(see below for img definition) does not require these attributes, however this is the second time I have seen this issue.

DTD definition for img tag:

alt %Text; #REQUIRED
longdesc %URI; #IMPLIED
height %Length; #IMPLIED
width %Length; #IMPLIED
usemap %URI; #IMPLIED
ismap (ismap) #IMPLIED
align %ImgAlign; #IMPLIED
border %Length; #IMPLIED
hspace %Pixels; #IMPLIED
vspace %Pixels; #IMPLIED

Posted in CSS, HTML. Tags: , . Leave a Comment »