SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2006
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    content: property

    Is this possible? The pdf icon does not show up on the printed page.

    Code:
    a[href $='.pdf']:after {
    	padding:3px; 
    	display:inline; 
    	vertical-align:middle;
    	background-color:#FFF; 
    	content: url(/images/pdficon_small.gif);
    }

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hi, just set it as a background image instead of doing it as content . Besides, that's invalid anyway, you could have done something like this
    Code:
    a[href $='.pdf']:after {
    	padding:3px; 
    	display:inline; 
    	vertical-align:middle;
    	background-color:#FFF; 
    	content: "content";
    }
    THat could be used, just saying lol
    You could try this
    Code:
    a[href $='.pdf'] {
    	padding:3px; 
    	display:inline; 
    	vertical-align:middle;
    	background: #FFF url(/images/pdficon_small.gif) no-repeat top right;
    }
    I'm just guessing you want it on the right, so if you don't want it on the right change the last value on "background" to "left"
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  3. #3
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    In a quick test in Firefox 3.6 that seems to work as expected.

    Not all browsers have full support for generated content though and some things can be disabled in the browser to limit what is printed on the page. Have you seen the reference?
    http://reference.sitepoint.com/css/content

  4. #4
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by RyanReese View Post
    Hi, just set it as a background image instead of doing it as content . Besides, that's invalid anyway, you could have done something like this
    Background images don't print by default.

  5. #5
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    In that case he could hard code an <img> in, though you should avoid printing images to save user toner
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  6. #6
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by RyanReese View Post
    In that case he could hard code an <img> in, though you should avoid printing images to save user toner
    I disagree, I like this use of CSS even though it doesn't have full support yet. I believe Cathy is a she

  7. #7
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I don't like it either, however if she needs the image printed, then to get all browsers working, my solution will work.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •