WordPress.org

Ready to get started?Download WordPress

Forums

Output HTML-code only if Firefox (3 posts)

  1. Addeanton
    Member
    Posted 2 years ago #

    Hi, I am having compability issues between IE and Firefox.

    I would like some PHP-code to solve my problem.

    if Mozilla Firefox is used
    {

    <div style="position:relative; width:980px; margin-top:350px;">

    </div>

    }

  2. Johnb81
    Member
    Posted 2 years ago #

    What you need to do is a little bit more complicated than that. You have to check the User-Agent string of a browser and match that.

    More information about User-Agent string: http://en.wikipedia.org/wiki/User_agent

    There are many scripts available out there to help you retreive a User-Agent string. Then use it's output.

  3. Addeanton
    Member
    Posted 2 years ago #

    Actually believe that it's hard to find a good user-agent code, but I will keep looking

Topic Closed

This topic has been closed to new replies.

About this Topic