2

How to edit selectors to test something in Firebug?

alt text http://shup.com/Shup/365060/1105167712-My-Desktop.png

for example if i want to test

this

#Homepage #thirdCol a 

as a

#Homepage #thirdCol > a 

how to test like this in firebug

4 Answers 4

3

In Firebug, select the CSS tab.

The daughter bar will now show: a pause button, an "Edit" control, and the "first" CSS file, next to a down arrow.

Click on that down arrow to select the appropriate CSS file -- which you can identify in the HTML/CSS view.

Then click "Edit" and you can add, change, delete, or comment-out CSS selectors as much as needed.

ETA: See also seanizer's answer. Firebug's HTML+Style pane has direct links to the editable source of the style rules it displays.

Sign up to request clarification or add additional context in comments.

3 Comments

That looks like the main CSS for SO. It works fine for me (I can edit it). Make sure the browser cache is on and reload the page.
yes u r right. i keep cache disable always. now it's working.
1
  1. Right click an element that has the selector you want to change
  2. Choose 'Inspect Element' from the menu
  3. In the 'Styles' tab, look for the selector you want to change, click the link next to it
  4. the style sheet will open, click the selector label and edit it. changes apply immediately

1 Comment

in the context menu, if you have firebug installed
0

Edit the HTML (using FireBug) and add a new style element.

<style type="text/css"> #Homepage #thirdCol > a { ... } </style> 

1 Comment

This doesn't allow changing or deleting an existing selector (unless it's coded in the html page itself). It merely allows adding a new one.
0
  1. Right click once on the '#Homepage #thirdCol a' text that is in your screen shot
  2. Choose 'Inspect in CSS Tab' from the context menu.
  3. Left click once on '#Homepage #thirdCol a' (after the css tab is opened)

you should now be able to edit the selector.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.