Support » Themes and Templates » Finding DIV's in a php

Finding DIV's in a php

  • Can someone explain to me when a website is written in php where i can edit the DIV’s that that php page is linked to. For example when i go onto the element inspector through a browser i can see and modify the divs as the code is displayed in html but where do i go to look to find this html?
    Thanks in advance.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The answer to this is reliant on the circumstance at-hand. There is no absolute answer.

    ok, for example i want to edit the html on this page:

    how would i go about doing that?

    The HTML is usually split up into different files.
    In your example, the section with the large purple banner could be in a file named header.php. The main section (below the purple banner) could be within a file named content.php.

    I see. For arguments sake say the purple banner is called header.php and it has a rule of opacity:10 where would i go to edit that rule? would it be in the header.php script?

    A JavaScript opacity?

    Moderator Jose Castaneda


    Is there a specific div element you are trying to target? Why are you trying to edit divs? I ask because all php files are capable of containing many or no div elements.

    On the page i linked to further up, when i go on the element inspctor there is a class that displays as this:

    <cufon class=”cufon cufon-canvas” alt=”Yum ” style=”width: 66px; height: 28px; “><canvas width=”82″ height=”30” style=”width: 82px; height: 30px; top: 1px; left: 0px; “></canvas><cufontext>Yum </cufontext></cufon>

    I can edit the style in the inspector but obviously that isn’t going to save so i’m just wondering where abouts i go to edit that style?

    actually, more to what i want to do is eliminate this margin left rule. But as its a style designated to that div class it doesn’t appear in the CSS and im at a loss as to where to find it? are they assigned in the php script?

    <div class=”productcol” style=”margin-left:168px;”>

    Moderator Jose Castaneda


    That would be javascript that is doing that. And from what I can see the theme is a premium theme??

    I’m not sure if this is an answer to your question, but if you’re asking what I think you are, have you tried installing the Reveal Template plugin? This will show you which template to find the code you need to edit. It will automatically appear at the bottom of your page.

    EDIT: “if you’re asking what I think you are” = me questioning my understanding of your question, not questioning your explanation. 🙂

    yeah, kind of. I installed the plugin and can now see what template each page is using which is useful.
    But say on this page: http://chumpspotter.com/chinapalace/?page_id=5
    I want to delete the price £2.40 as it displays twice. Now in the element inspector i can just highlight the div and delete it but where would i do that in the backend of wordpress? I can’t see where i would find that div to delete it.
    Also on the same page i want to get rid off the < br. > that is in each field but dont know where that form is stored in order to edit it.
    Hope that makes sense!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Finding DIV's in a php’ is closed to new replies.