Markdown, Google Code and notices
February 16, 2012 4:10 PM Subscribe
How would I create a "note", "tip" or "caution" notice box (rough examples) with the syntax provided by Markdown and Google Code? Is there a trick to make this possible?
Best answer: Google Code does not seem to like bgcolor for td elements, and I can't seem to get CSS styles to work either. Bummer.
posted by Blazecock Pileon at 4:38 PM on February 16, 2012
posted by Blazecock Pileon at 4:38 PM on February 16, 2012
I don't have a Google code Markdown environment to play with. However, when I try the following
In a production environment you would, of course, not use the style= element of the div tag but would put all the CSS into a linked stylesheet whenever possible and rely on the the class selector to apply the correct style at runtime.
posted by ob1quixote at 10:43 PM on February 16, 2012 [2 favorites]
<div class="success" style="border: 1px solid; margin: 10px 0px; padding:15px 10px 15px 50px; background-repeat: no-repeat; background-position: 10px ; center; color: #4F8A10; background-color: #DFF2BF; background-image: url('http://icons.iconarchive.com/icons/custom-icon-design/pretty-office/32/success-icon.png');">Successful operation message</div>
on the Daring Fireball Markdown Dingus Sandbox I get a box very much like your example.In a production environment you would, of course, not use the style= element of the div tag but would put all the CSS into a linked stylesheet whenever possible and rely on the the class selector to apply the correct style at runtime.
posted by ob1quixote at 10:43 PM on February 16, 2012 [2 favorites]
The trick, such as it is, is that Markdown in general and the Google Code implementation in particular supports the <div> tag, which is all that is required for those Janko-style boxes to work.
posted by ob1quixote at 10:54 PM on February 16, 2012
posted by ob1quixote at 10:54 PM on February 16, 2012
Response by poster: The trick, such as it is, is that Markdown in general and the Google Code implementation in particular supports the <div> tag
Thanks. I just tried your code snippet, and it doesn't appear to work. Perhaps because I can't link to another stylesheet.
What I did instead was make a two-column table with a "tip" or "note" graphic on the left and the message on the right.
It doesn't look exactly like what I want, but along with coloring the text the same color as the graphical widget, the message stands out well enough from the body text to suit my needs.
posted by Blazecock Pileon at 12:07 AM on February 17, 2012
Thanks. I just tried your code snippet, and it doesn't appear to work. Perhaps because I can't link to another stylesheet.
What I did instead was make a two-column table with a "tip" or "note" graphic on the left and the message on the right.
It doesn't look exactly like what I want, but along with coloring the text the same color as the graphical widget, the message stands out well enough from the body text to suit my needs.
posted by Blazecock Pileon at 12:07 AM on February 17, 2012
It didn't work even with the style in-line? That's disappointing. I'll mess with it when I get to my desk.
posted by ob1quixote at 9:15 AM on February 17, 2012
posted by ob1quixote at 9:15 AM on February 17, 2012
Huh, you know if I had actually read that documentation on the Google Markdown implementation I'd have seen that they don't support the style attribute of the div tag, only title, dir, and lang. That stinks because it works fine in the full Markdown implementation. Sorry to have gotten your hopes up.
On the other hand, thanks for giving me the round-tuit I needed to begin to upload my project to Google Code.
posted by ob1quixote at 12:51 PM on February 17, 2012
On the other hand, thanks for giving me the round-tuit I needed to begin to upload my project to Google Code.
posted by ob1quixote at 12:51 PM on February 17, 2012
Response by poster: Yeah, Google Code pretty much sucks for documentation options. I ended up having to use tables to get any kind of aesthetic, which pretty much defeats the purpose of a wiki in the first place.
posted by Blazecock Pileon at 2:19 AM on February 18, 2012
posted by Blazecock Pileon at 2:19 AM on February 18, 2012
This thread is closed to new comments.
If someone has a trick for this, I'd also like to see it.
posted by ralan at 4:29 PM on February 16, 2012