![]() |
|
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| PHP/HTML/CSS/JavaScript and Servers Pick up tips and exchange info on the technical side of having a web presence. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi all
Could someone tell me how to use Firebug please. I understand the concept but can't seem to figure it out. I have it installed and know how to activate it when needed. What I don't know how to do is for example use it to tell me where a certain element of my webpage is coded in the php or css files. Hope that makes sense... Arkie... |
|
|||
|
Firebug? Do you mean the plug-n for Firefox? If so, you need to have a very good grounding in HTML and CSS before even considering using it.
PHP is a server side technology and CSS is a style sheet to format your web pages, there is no comparison between the two. It's impossible for a browser (with or without the Firebug plug-in) to tell what has been done by PHP as it is done on the server behind closed doors before the page is sent to the browser. Firebug only deals with the HTML and CSS that is sent to the browser, PHP doesn't come into it.
__________________
Lawrence |
|
|||
|
Thanks for the reply Lawrence...
All I really want is some way of working out where any given element on my site is coded so I can change it if I want to. For example, if I wanted to change the colour of my sideboxes, how would I know where the code for that particular element exists? (in this example I do actually know the answer) The reason I installed firebug was because someone on Zencart forums suggested I should do so after I had asked a couple of questions about the whereabouts of relevant code to change the look of my site. I assumed therefore that firebug would allow me to find what I wanted. Arkie..... |
|
|||
|
If you select the element on the page you're interested in, FireBug will highlight the HTML and CSS that controls that part of the page. The CSS that is displayed by Firebug is the same that is in the CSS files or embedded within the page's HTML, but the HTML displayed isn't necessarily what is in the PHP files because PHP creates HTML on the fly, so if you go looking for it, you're unlikely to find it, it depends on how that part of the page has been created.
As an example, you might want to look for the bit of the page where Firebug displays the bit of a page that says "Stock: 17". You can find this in the page's HTML, but if you look at the PHP file you won't find it because it isn't stored like that. The part of the PHP page that displays this part of the page could be something like PHP Code:
In short, you can use FireBug to locate the CSS, but if you try to locate where an element is in PHP, you're likely to give yourself a headache as what you see doesn't exist in the file in the same format.
__________________
Lawrence |
![]() |
| Thread Tools | |
| Display Modes | |
|
|