I'm directing this to the list because I feel it's relevant to the
discussion. I thank the respondent for their input. However, I am
respecting their privacy...

On Sunday, July 10, 2011, 5:04:32 PM, a list member wrote in a private
message:

> vertical-align is a property that only applies to a table cell.  If
> you use it, you should have it in the style attribute of the <td>.

FWIW, that's what I thought until I read the W3Schools page at
http://www.w3schools.com/cssref/pr_pos_vertical-align.asp, in which
they give an explicit example of using it with an image. At the time I
had an issue where the middle of the div aligned vertically with the
bottom of the images. So I applied 'vertical-align:middle' to both
images and divs and obtained the correct vertical alignment! So,
contrary to what I'd previously believed and what the respondent seems
to believe, you can apply vertical-align to inline elements to align
them with some datum of the containing element.

> Why use display: inline-block at all?  Try floating them to the left
> inside the cell.

That's something I hadn't tried but will keep in mind in case I need
it for the future. The issue was solved by using spans in place of
divs as 'pseudo-icons'. I've now deployed the application and don't
want to go through the change procedure so soon and so I'll leave it
be for now.

> /* Of course, it's always a good idea to separate your CSS from your HTML */

Of course it is *provided that you can actually do that*. As I
explained in my OP, the generated code is to be inserted into someone
else's web page. For further info, I don't have access to the head
section and so can neither link style sheets nor create a style block
and thus have no choice but explicitly style every element for which
styling is required. Sorry if that wasn't made clear in my OP.

Best regards,

-- 
Geoff Lane
Cornwall, UK

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to