inspector picks up classes from linked style sheet?

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
madhg
Posts: 22
Joined: Tue Jan 31, 2006 2:24 pm

inspector picks up classes from linked style sheet?

Post by madhg »

My html page has <link> in the header. The .html and .css files are both open in HTMPad.

I type "<span class =" . Inspector is open but it does not pick up the classes from the linked style sheet. Should it do this? It would be extremely helpful if it did.
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

It does, but just not as you'd initially expect.
See this topic in the 'Feature requests' section.

http://forums.blumentals.net/viewtopic.php?t=1349
madhg
Posts: 22
Joined: Tue Jan 31, 2006 2:24 pm

Post by madhg »

Thanks for the tip. But it doesn't seem to work for me. Your demo says "Webbuilder". Does it work also for HTMLPad?
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

Should do - it should be the same 'engine'. I'll download the demo and have a look...
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

OK, just tried this, and it works in the same way as WeBuilder
Image

I didn't appreciate how similar HTMLPad and WeBuilder were - both can do php scripts, css, etc. There must be some differences!

Anyway. I don't know why its not working for you. The html and css are properly linked, aren't they?

So the Inspector window remains blank? Is this with the .html and .css files both saved?
madhg
Posts: 22
Joined: Tue Jan 31, 2006 2:24 pm

Post by madhg »

Yes, files are saved, and .css file is linked as you can see from the screenshot.

Image

There are no classes in the drop-down box. Maybe you can see some stupid mistake I made? :?
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

If you type a class manually, does it actually work, ie, the css is working?
Can't see anything obvious why its not working. The css and html are in the same directory, I presume?
madhg
Posts: 22
Joined: Tue Jan 31, 2006 2:24 pm

Post by madhg »

This is a page that has existed for years, I revise it regularly and the internal preview of HTMLPad has the .css formatting. I guess that that, together with the link visible in the screenshot, shows that bsaa.css is in the same directory.

Putting the class names in manually does work, that's what I'm doing at present. It's not a big deal, since I don't do a great deal of this stuff. Still, it's a useful feature if it works.

By the way, if I put the cursor anywhere in the <span> tag, the class name appears in the inspector. But none of the other class-names.
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

Any chance you could zip and mail me the html and css? If so, drop them to me at tmp18 @ chrisjlocke . co . uk (obviously without the spaces!)

Also, what version of htmlpad are you using? (I see its 2006, but is it the latest version?)
madhg
Posts: 22
Joined: Tue Jan 31, 2006 2:24 pm

Post by madhg »

Version 7.2.0.68. It tells me it's the latest.
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

I did notice it in your screenshot, but forgot to test it.
Would you believe its the 'Rel="StyleSheet"' line. Make the 'StyleSheet' lowercase, and it will work.

Yup, its a bug... :oops:
madhg
Posts: 22
Joined: Tue Jan 31, 2006 2:24 pm

Post by madhg »

Aha! Your workaround does the trick! Though it is really clunky, having to insert quotes (which aren't necessary, are they?) carry on and then go back. I hope this will get smoothed out.

Anyway, many thanks for finding the problem and providing a working solution,
David
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

No problem. Glad it works now!
I tend to let the application add the style link line for me. From the 'Insert' menu, click 'Style sheet link'. Enter the css file (this can just be the filename, or relative link, eg, 'css/styles.css') and the app will add the link for you.
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

Inspector should display classes, while for auto complete drop down this is not yet implemented, but will come.
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

The inspector only displays classes if the 'stylesheet' bit in the link is lowercase though - if mixed case (as per above screenshot) then the inspector gets upset and doesn't play ball.
Post Reply