More CSS Tricks
Sunday, 9. March 2008, 05:51:17
The jagged edge is intentional. This is using a right alignment. This is nothing more than a div with some styling and anyone can do this easily.
Copy the code below into your own blog and check it out. You can "float" your text "left" or "right", change the width of the overall quote, change its colours to match your page, align your text, pretty much anything you want to do.<div style="float:right;width:150px; margin-top:15px; margin-bottom:15px; margin-left:10px; padding-bottom:10px; font-family:Arial, Helvetica, Georgia; font-size: 28px; line-height:24px; color:#FF6600; text-align: right;"> <span style="color:gold;">...this will </span> look like some of the <b>pullquotes or subtitles you see</b> in <span style="color:gold;">magazines</span> </div>Another style of "pull quote" is an inline box. Again there is nothing difficult about these they are nothing more than divs on your page.
Inline Pull Quotes
You don't have to define the pullquotes in the style sheet. The code is short and doesn't use too many keystrokes. It's just another paragraph in CSS.
<p style="float:right; width:30%; padding:8px;border:1px solid blue; font-size:10; margin-top:10px;margin-bottom:15px; margin-left:10px; background-color:#1E1E1E;"> <strong>Inline Pull Quotes</strong><br> You don't have to define the pullquotes in the style sheet. It's just another paragraph in CSS. </p>Go ahead have fun and most of all experiment. If you aren't sure of your CSS skills and could use a little help then be sure to check out the CSS tutorials online at W3Schools.com Need a bit more to help you out, then visit Newsgator and download either the trial version of Top Style or the Lite version for free.
By solid copper, # 9. March 2008, 06:18:16
By themugs, # 9. March 2008, 06:33:42
I know you
By lesswoodsend, # 9. March 2008, 07:50:35
By themugs, # 9. March 2008, 07:54:57
I've been using pullquotes in my blog aready, see I have a Mac, so I'm safe, right?, with yet another different styling.
One major difference though: instead of an anonymous div, or an ordinary paragraph, I'm using a blockquote element for the pullquotes. That's not only a semantically better markup (a pull quote is a quote after all, and that's what blockquote is for), but it will also be more accessible for those using screen reader software, precisely because it doesn't look an ordinary paragraph in the normal text flow.
I simply use a blockquote element with a class="pull" and have a style for that in my own stylesheet. That way you only have to define the style once and the styling will be consistent across different posts. My style also inherits the background "quote" image from My Opera's default style for blockquotes, but that can of course be overridden. All your styles can be applied to a blockquote element as well.
By JavaWoman, # 9. March 2008, 11:43:40
By noah counte, # 9. March 2008, 15:04:52
Accessibility on my blog is not an issue, my blog is not accessible at all. There are no ALT tags, no TITLE, LONG DESCRIPTION, nor ACRONYM tags in place, there are no alternative formats.
As for screen readers JAWS (the most common in use) can not read any page in the MyOpera community so that it makes sense.
<--------------------------------------------------------------------->
Quite right ...this has the potential to be grossly over used.
By themugs, # 9. March 2008, 17:53:16
But I always pay attention to accessibility as well, not just semantics.
I cannot imagine JAWS cannot read any page here - it's highly configurable and can usually be made to read the most obstinate pages, and I don't see any obvious obstacles in the code (except possibly those created by user-created content). I joined here because of the clean and (almost) standards-compliant code! And that's the first step towards accessibility. That said, more could be done, and I'm working on a post related to that.
By JavaWoman, # 9. March 2008, 18:33:03
By daxonmacs, # 29. June 2008, 08:13:12