At 18:51 -0400 on 08/18/2011, Lawrence San wrote about Re: Auto-complete CSS classes or IDs from a linked CSS file:

When I drag an image into a BBEdit HTML document, the dialog asks me whether I want BBEdit to enter the dimensions of the image. I say yes (leave it checked), but I usually don't really want the dimensions in the inline HTML code.

Why do you not want it in the img tag? Leave it there unless the multi-page or changeable caveat below applies.

After the img tag is inserted by BBEdit, I typically...

1. Add an ID to the image's HTML tag
2. Create a new CSS rule in the styles section of the document's head, with a selector using the same ID as the image 3. Transfer (cut and paste) the width and height that BBEdit inserted for me, from the HTML in the body to the new CSS rule in the head, which of course means changing its format slightly from HTML to CSS 4. Later, I may transfer the rule again from the document's head to a linked CSS stylesheet

Is the image going to appear on more than one page? If not then the above leave-it-in-the-img-tag comment above probably still applies. The only time that putting it in an external CSS file might be useful is if the image to display might be changeable in which case putting its dimensions AND URL in the CSS entry so you can swap it (on any pages it appears on) by editing the CSS entry can be a useful updating solution.

--
You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to