SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    549
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    finding code with inspect element

    When your using "inspect the element" to find code is there a way to fine out where that code ( html ) is held. It tells you the name of the css files and line for css but how do you tell what files the html is in?

    Many thanks

  2. #2
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,222
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Hi, hantaah, The HTML is in the file that you are inspecting and possibly right under your cursor.

  3. #3
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    549
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hi

    I'm not inspecting it in the actual file, I'm inspecting it from the firebug inspect element. In the css area it tell your what file that css is in but it doesn't for the html

  4. #4
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,222
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Yes, but don't you have to have a particular HMTL file open in order to inspect its CSS? I'm probably misunderstanding because you are doing something I've never thought of.

  5. #5
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    549
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    of course but I want to edit the html and want to know what file it is in to edit it, not just edit it in inspect element

  6. #6
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,222
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    There's where I'm getting lost... if you have an html file open, how do you not know what file it's in? UNLESS, maybe the HTML is assembled from php calls and you would like to know which php file a portion is in. Is that what you're talking about? Sorry to be dense.

  7. #7
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    549
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    i'm seeing the html in firebug ( firefox ) by right clicking the web page and inspecting the element. It shows you the html, I don't have any file open, all done from the browser

  8. #8
    SitePoint Addict bronze trophy
    Join Date
    Mar 2013
    Location
    Oneonta, NY
    Posts
    307
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hantaah,

    I’m not sure there is a specific option in firebug that will say “this html file is located in this folder on your server”. I could be wrong but I don’t think it will show this info. The URL of the page should give you a clue. Usually it won’t show the absolute path to the HTML document but it could give you an idea where to start looking.

    I’m not sure what you are using to upload files to your website but if you are familiar with an FTP program like Filezilla, you can use it to search your server for an HTML file.

    Here is a tutorial on how to do that,

    http://www.addictivetips.com/windows...filezilla-325/

    Best,

    Shawn

  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    HI, As others have alluded to you if you are inspecting an element on a live page then you must have already navigated to that page and therefore its whereabouts must be known to you (although of course the page may be built with includes or php so you won't know where all fragments came from).

    When you inspect an element then you get the css for that element and you can also see the html in that current page that the css refers to. It won't tell you where on your server that page is located but in most cases that would be pretty obvious from the url for most simple sites.

    You may need to explain a little more about the problems you are having and maybe we can suggest something else.


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
  •