473,778 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make all hyperlinks on a page go e.g. italic?

Hello!

I'm a complete Javascript newbie and my question is surely very naive, but
believe me, I've spent this whole day searching thru the net and didn't find
any solution to my little problem.

So it goes: I don't know how to set the style (bold, italic, underlined) to
all hyperlinks on a page. I know how to get one like this, but I mean all of
them by default, I mean I downloaded a Javascript script from the net, a
simple search engine, and I want it to have all hyperlinks it returns in a
certain style. I know the command to set all of them to a color
(document.linkC olor=), but I couldn't find it about their style, though I
have been searching for the solution on the net for the whole day like a
jerk. Please help me!

Greetings,
Aasp
Jul 23 '05 #1
3 1473
On Sat, 22 May 2004 20:44:02 +0200, Aasp wrote:
So it goes: I don't know how to set the style (bold, italic, underlined) to
all hyperlinks on a page.


<style type='text/css'>
a { font-style: italic; }
</style>

(..in the <head>)

HTH

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2
In article <c8**********@a tlantis.news.tp i.pl>, "Aasp" <aa**@op.pl>
wrote:
So it goes: I don't know how to set the style (bold, italic, underlined) to
all hyperlinks on a page. I know how to get one like this, but I mean all of
them by default, I mean I downloaded a Javascript script from the net, a
simple search engine, and I want it to have all hyperlinks it returns in a
certain style. I know the command to set all of them to a color
(document.linkC olor=), but I couldn't find it about their style, though I
have been searching for the solution on the net for the whole day like a
jerk. Please help me!


You need to exercise some caution here.

Remember your user. You user has to navigate your page. It will be
easier on your user, if your page is consistent with other pages on the
web. A user may expect links to be underlined. This is dependent on the
layout of your page. I'd assume a user can figure out a bolded or italic
text that is underlined is a link. Removing the underline may make it
harder for your user to figure out what is the link on your page.

The layout of the page may make it obvious what is a link. Such as a
list on the left hand side of the page. I'd try to mimic the style of
Ebay, Amazon, and Yahoo.

Robert
Jul 23 '05 #3
"Aasp" <aa**@op.pl> wrote in message news:<c8******* ***@atlantis.ne ws.tpi.pl>...
Hello!

I'm a complete Javascript newbie and my question is surely very naive, but
believe me, I've spent this whole day searching thru the net and didn't find
any solution to my little problem.

So it goes: I don't know how to set the style (bold, italic, underlined) to
all hyperlinks on a page. I know how to get one like this, but I mean all of
them by default, I mean I downloaded a Javascript script from the net, a
simple search engine, and I want it to have all hyperlinks it returns in a
certain style. I know the command to set all of them to a color
(document.linkC olor=), but I couldn't find it about their style, though I
have been searching for the solution on the net for the whole day like a
jerk. Please help me!


Put this CSS in the <head> section of your HTML document:
<STYLE>
A {
font-style:italic;
text-decoration:unde rline;
}
</STYLE>
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2423
by: Imaya Kumar | last post by:
Hi, i'm developing an editor in VS.NET using Rich Text Box Control. I need to make a selected text Bold. how can i do this? also i will have an Italic Button too. If i click Bold button the selected text has to become bold, and if i click italic button, the bolded text has to become Italic too with the bolded attribute. how can i do this? help me.. thanks imaya kumar
1
4333
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i want to make first text as Table Heading/menu category. For examle in the given menu i want to make a heading as "Comp. Languages" which won't be a link. 2) The position of this menu is absolute to the page. I want to make it absolute to the Table...
6
2235
by: Patrick Olurotimi Ige | last post by:
I have a Datalist in a form with a hyperlink i would like to make the hyperlink visible only when a checkbox is clicked and not visible when not clicked . But doing this below in page_load it gives me error:- Object reference not set to an instance of an object. If CheckBox1.Checked = True Then hyperlink1.Visible = True
6
5123
by: divya | last post by:
I have a page name edit.asp which should expire immediately .The user cannot open this page directly he has to provide a password for entering this page.thus when the user enters edit.asp , it has a button EDIT ,which when user clicks directs him to another page (done.asp). Now the problem is that from this page (done.asp) if he clicks on the back button on the toolbar then edit.asp opens.But I don't want it to open It should show page...
0
1400
by: the.tinapatel | last post by:
Guys, I want the user to be able to select font (such as Bold, Italic, underline) and stuff like that from a dropdown list) and then I wanna apply these properties to all my page (all text). Now I'm doing something like this: string font = string.Empty; switch(ddl2.SelectedItem.Text) {
1
1373
by: blueplato | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Reflection/Roundcorners Demo</title> <script type="text/javascript" src="scripts/reflection.js"></script> <script type="text/javascript" src="scripts/rounded_corners_lite_inc.js"></script> <style type="text/css">
2
2890
by: =?Utf-8?B?S3VtYXIuQS5QLlA=?= | last post by:
HI I want to disable the underline of a hyperlink text in a hyperlink column of datagrid/gridview in the content page. If I am writing a css class to disable it in the master page then its disabling the underline for all the hyperlinks in the page. The datagrid/gridview is placed in a html table.
1
2276
by: =?Utf-8?B?Um9nZXI=?= | last post by:
In my app I would like to change the color of the hyperlink from blue to purple when a user clicks the hyperlink in a RichTextBox. The DetectUrls property is set to True and I handle the RichTextBox1.LinkClicked event to launch a browser window. That works fine. The problem is that once the DetectUrls property is True the RichTextBox control shows the link in blue even if I select the text and change the SelectionColor to purple. For...
1
2175
by: soluvah | last post by:
Hello Folks, Been trying to widen my site's body from "779" to "1000" so it almost fills the window. IE 7 on windows XP just dismantles the pages and leaves wide gaps between the left column and the body with no change in size to the body width. FF is doing it right. Please let me know if this problem can be fixed, I am at my wit's end. I will also send more code if needs be. I have lots of other code but I will copy and paste the one I...
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10292
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5368
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.