/    Sign up×
Community /Pin to ProfileBookmark

correct syntax

What is correct syntax to hide all <a href=…</a> besides few ones which will have an ID?
Also, is there the same way to block javascript like <script type=”text/javascript> besides ones which will have an ID?

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@BonRougeOct 25.2004 — For the css I guess you have a couple of choices :

a {display:none} (if you want them gone completely) or

a {visibility:hidden} (if you want them to be invisible but still there i.e. the space they should occupy is still there (if that makes sense)).

For the javascript... I'm a little confused to be honest. What kind of javascript is it? (What's the function?)
Copy linkTweet thisAlerts:
@CharlesOct 25.2004 — [font=monospace]a[id] {display:none}[/font]
Copy linkTweet thisAlerts:
@TaurusauthorOct 25.2004 — could you be more specific: how code should look to block a <href,

except for ones which have an ID?


Also, how to block bar like this:

<DIV style="BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT: 4px; PADDING-LEFT: 4px; FONT-WEIGHT: bold; FONT-SIZE: 13px; BACKGROUND: #dddddd; FILTER: progid DXImageTransform.Microsoft.Gradient (GradientType=0, StartColorStr='#EEEEEE', EndColorStr='#AAAAAA'); PADDING-BOTTOM: 4px; MARGIN: 0px; WIDTH: 100%; COLOR: #000000; PADDING-TOP: 4px; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: arial,sans-serif; WHITE-SPACE: nowrap; HEIGHT: 25px">

<STYLE>.fplink {

TEXT-DECORATION: none

}

.fplink:hover {

TEXT-DECORATION: underline

}

</STYLE

As to javascript- just to block all javascript whatever they do.


<script type="text/javascript"

src="http://host.com/page/shows.js">

</script>
Copy linkTweet thisAlerts:
@CharlesOct 25.2004 — [font=monospace]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta name="Content-Script-Type" content="text/javascript">

<meta name="Content-Style-Type" content="text/css">

<title>Example</title>

<style type="text/css">

<!--

a[id] {display:none}

-->

</style>

</head>

<body>

<ul>

<li><a href="fee.html">Fee</a></li>

<li><a href="fie.html">Fie</a></li>

<li><a href="foe.html">Foe</a></li>

<li><a href="fum.html" id="fum">Fum</a></li>

</body>

</html>[/font]

That's the correct syntax. That some unfortunate browsers do not support it is not my fault.
Copy linkTweet thisAlerts:
@TaurusauthorOct 25.2004 — But how set ID to <a href ones which must be displayed?
×

Success!

Help @Taurus spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...