LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-06-2012, 01:59 PM   #1
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 858

Rep: Reputation: 383Reputation: 383Reputation: 383Reputation: 383
Changing the parameter of an inline style declaration in HTML? (I know... off topic)


Hi fellow Slackers,

I know this is off-topic but I would like to ask this in this forum since it's home for me as a Slackware user, and also because its members are highly knowledgeable. So, please bear with this little question:

There's a webpage where a section with material I would like to see is surrounded by a <div> tag. Now, the problem is that this tag has an inline style that prevents it from being displayed, e.g., <div id="Whatever" display:none>

My question is: how could I alter that particular inline style without disrupting anything else on the page? I'm using Chrome and Firefox.

Thanks!
 
Old 10-06-2012, 02:11 PM   #2
odm4286
LQ Newbie
 
Registered: Nov 2009
Posts: 17

Rep: Reputation: 0
Quote:
Originally Posted by sombragris View Post
Hi fellow Slackers,

I know this is off-topic but I would like to ask this in this forum since it's home for me as a Slackware user, and also because its members are highly knowledgeable. So, please bear with this little question:

There's a webpage where a section with material I would like to see is surrounded by a <div> tag. Now, the problem is that this tag has an inline style that prevents it from being displayed, e.g., <div id="Whatever" display:none>

My question is: how could I alter that particular inline style without disrupting anything else on the page? I'm using Chrome and Firefox.

Thanks!
<div id="whatever" display:none><span style="blahh blah blah"> stuff you want to have styled</span></div>

That should do it
 
Old 10-06-2012, 02:37 PM   #3
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 858

Original Poster
Rep: Reputation: 383Reputation: 383Reputation: 383Reputation: 383
odm4286: Thanks. But perhaps I didn't explain myself correctly.

The page is on the Web and I cannot edit it. What I would like is for the browser to alter singlehandedly, client-side, the inline style declaration so that display:none gets changed into something like display:screen (or simply gets deleted).

I want to do it transparently and automatically, every time I access the page. It would be something like AdBlock plus, but only for this particular style declaration.

Thanks
 
Old 10-06-2012, 03:10 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
This could help if you use Firefox.

Or try the Stylish add-on for Firefox.

Last edited by Didier Spaier; 10-06-2012 at 03:15 PM. Reason: Second sentence added.
 
1 members found this post helpful.
Old 10-06-2012, 03:27 PM   #5
WetDreams
LQ Newbie
 
Registered: Feb 2011
Distribution: Slackware
Posts: 12

Rep: Reputation: 3
You could change it with javascript. on Firefox open the console with Ctrl+Shift+K and paste this line(change "whatever" with the id you need).
Code:
document.getElementById("whatever").style.display = "screen";
I am not very familiar with javascript but I believe the above should work.

If this works, you could install greasemonkey and install as a userscript in order to execute this automatically every time you visit the page.

I am not sure about chrome, but I guess something similar should work.

You could also use the Stylish addon that Didier Spaier suggested.

Last edited by WetDreams; 10-06-2012 at 03:32 PM.
 
1 members found this post helpful.
Old 10-06-2012, 04:28 PM   #6
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 858

Original Poster
Rep: Reputation: 383Reputation: 383Reputation: 383Reputation: 383
Thanks, I'm going to try all the suggestions. I might go with stylish or the per-site CSS that Didier suggested.
 
Old 10-06-2012, 05:00 PM   #7
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 858

Original Poster
Rep: Reputation: 383Reputation: 383Reputation: 383Reputation: 383
I'm happy to report that the Stylish add-on is available for both Chrome and Firefox and a simple userstyle fixed my problem. THANK YOU!!! Marking the thread as solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
capture parameter from iframe to main.html shifter Programming 1 08-28-2010 05:21 PM
Parameter passing in HTML john2 Programming 3 06-12-2010 04:22 PM
how to give inline comment at variable declaration in Makefile w/o including space..? mayankmehta83 Linux - Newbie 6 12-07-2009 04:33 AM
LXer: A Declaration of Independence - Geek Style LXer Syndicated Linux News 0 07-05-2008 12:00 AM
send mail with inline images along with html in perl tanveer Linux - General 2 12-14-2007 05:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration