Closed Thread
Results 1 to 7 of 7

Thread: [CSS] pseudo elements and firefox

  1. #1
    Hignar's Avatar
    Hignar is offline Programming Expert
    Join Date
    May 2009
    Posts
    419
    Blog Entries
    2
    Rep Power
    12

    [CSS] pseudo elements and firefox

    I'm just starting to learn both HTML and CSS and am having problems with pseudo elements in firefox.

    In the CSS file I've got

    Code:
    div.content:first-line{text-transform: uppercase;}
    Now, using IE7 this displays as expected, but in Firefox 3.0 the first line of the div is displayed the same as the rest of the block i.e not uppercase.

    I know there are differences between browsers, but the book I'm following suggests that this should work in both IE and FF and googling doesn't seem to show that anyone else has the same problem.

    Any ideas?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Apr 2009
    Location
    Trapped in my own little world.
    Posts
    2,487
    Rep Power
    33

    Re: [CSS] pseudo elements and firefox

    I have never seen the use of a colon in the name.

    I would give the first few words a class of their own. It does not seem cross browser compatible.

  4. #3
    xsonline is offline Learning Programmer
    Join Date
    Apr 2009
    Posts
    48
    Rep Power
    11

    Re: [CSS] pseudo elements and firefox

    I usually do this by CSS.

  5. #4
    Hignar's Avatar
    Hignar is offline Programming Expert
    Join Date
    May 2009
    Posts
    419
    Blog Entries
    2
    Rep Power
    12

    Re: [CSS] pseudo elements and firefox

    Quote Originally Posted by xsonline View Post
    I usually do this by CSS.
    This is CSS.
    Quote Originally Posted by BlaineSch View Post
    I have never seen the use of a colon in the name.

    I would give the first few words a class of their own. It does not seem cross browser compatible.
    Thanks for the advice. This isn't actually something I want to use. It's just an example from a book. As I said, the book suggests that it's cross browser compatible, but I'm willing to accept that the book could be wrong.

  6. #5
    Hignar's Avatar
    Hignar is offline Programming Expert
    Join Date
    May 2009
    Posts
    419
    Blog Entries
    2
    Rep Power
    12

    Re: [CSS] pseudo elements and firefox

    According to w3schools this should work in all major browsers.

    CSS :first-line pseudo-element

    I'm getting quite frustrated with this now.

  7. #6
    Hignar's Avatar
    Hignar is offline Programming Expert
    Join Date
    May 2009
    Posts
    419
    Blog Entries
    2
    Rep Power
    12

    Re: [CSS] pseudo elements and firefox

    Think I've got it sorted now. In my html file I had something along the lines of

    Code:
    <div class="content"><p>Random paragraph of text</p></div>
    It would appear that IE still picks up the content of the paragraph as the first line of the div but firefox (and opera) does not. If I remove the <p> then it displays correctly in FF.

    I guess the solution is to ensure that the first paragraph of the div either doesn't use <p> tags or to apply the pseudo element to the first paragraph rather than the div.

    Right that's the chapter on basic CSS finished. Onto Javascript next.

  8. #7
    xsonline is offline Learning Programmer
    Join Date
    Apr 2009
    Posts
    48
    Rep Power
    11

    Re: [CSS] pseudo elements and firefox

    Quote Originally Posted by Hignar View Post
    This is CSS.
    Woops, sorry It was late yesterdag . Excuse me.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pseudo Code... just need feedback and maybe some help
    By wolfman in forum General Programming
    Replies: 5
    Last Post: 10-12-2011, 07:07 PM
  2. Get pseudo code into my calculator
    By RikardE in forum C and C++
    Replies: 4
    Last Post: 12-16-2010, 03:40 PM
  3. help me please : pseudo code
    By declaration19 in forum Java Help
    Replies: 9
    Last Post: 04-05-2010, 12:19 PM
  4. Pseudo Code help
    By mictamcody2000 in forum General Programming
    Replies: 2
    Last Post: 12-03-2008, 12:27 AM
  5. Pseudo Help?
    By dalgic in forum General Programming
    Replies: 1
    Last Post: 06-20-2008, 09:12 AM

Tags for this Thread

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