473,804 Members | 3,462 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS and Tags

if I want to change a tag with CSS with a file rather than having all the
CSS code on the HTML doc I know I can do the following

<SNIPPET>
body.Wyght
{
background-color: #D9D9FF;
border: 50px;
border-color: #A000B2;
font-family: cursive;
link color: red; /* unvisited links */
visited color: blue ; /* visited links */
hover color: yellow; /* user hovers */
active color: lime; /* active links */
focus background: yellow;
}
div.fBr
{
background-color: transparent;
float: right;
font-size: 125%;
font-family: fantasy;
color: #3300B2;
}
div.sGr
{
background-color: transparent;
float: right;
font-size: 125%;
font-family: serif;
color: #005B38;
}
div.cYr
{
background-color: transparent;
float: right;
font-size: 125%;
font-family: cursive;
color: #D4D400;
}
</SNIPPET>

Then I can use
<link href="../CSS/testStyle.css" rel="stylesheet " type="text/css">

if testStyle.css is the file

How do I use this in the HTML file?
Dec 23 '05 #1
5 1328
Els
NEWS wrote:
if I want to change a tag with CSS with a file rather than having all the
CSS code on the HTML doc I know I can do the following

<SNIPPET>
</SNIPPET>

Then I can use

<link href="../CSS/testStyle.css" rel="stylesheet " type="text/css">

if testStyle.css is the file

How do I use this in the HTML file?


Put the styles in a styleblock in the <head> of the HTML file, like
so:

<style type="text/css">
body{
background:red;
color:green;
}
</style>

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Dec 23 '05 #2
NEWS wrote:
body.Wyght
{ [...] link color: red; /* unvisited links */
visited color: blue ; /* visited links */
hover color: yellow; /* user hovers */
active color: lime; /* active links */
focus background: yellow;
}


No, that's syntacically incorrect. Write

body.Wyght a:link {
color: red; /* unvisited links */
}
body.Wyght a:visited {
color: blue; /* visited links */
}
body.Wyght a:hover {
color: yellow; /* user hovers */
}
body.Wyght a:active {
color: lime; /* active links */
}
body.Wyght a:focus {
background: yellow;
}

instead.
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Dec 23 '05 #3

"NEWS" <an******@nospa m.com> wrote in message
news:g3Zqf.4699 $AP5.4376@edtnp s84...
if I want to change a tag with CSS with a file rather than having all the
CSS code on the HTML doc I know I can do the following

<SNIPPET>
body.Wyght
{
background-color: #D9D9FF;
border: 50px;
border-color: #A000B2;
font-family: cursive;
link color: red; /* unvisited links */
visited color: blue ; /* visited links */
hover color: yellow; /* user hovers */
active color: lime; /* active links */
focus background: yellow;
}
div.fBr
{
background-color: transparent;
float: right;
font-size: 125%;
font-family: fantasy;
color: #3300B2;
}
div.sGr
{
background-color: transparent;
float: right;
font-size: 125%;
font-family: serif;
color: #005B38;
}
div.cYr
{
background-color: transparent;
float: right;
font-size: 125%;
font-family: cursive;
color: #D4D400;
}
</SNIPPET>

Then I can use
<link href="../CSS/testStyle.css" rel="stylesheet " type="text/css">

if testStyle.css is the file

How do I use this in the HTML file?


In the HTML file use
<div class="fBr">
These are tests
</div>
Dec 23 '05 #4

"Els" <el*********@ti scali.nl> wrote in message
news:18******** *******@locusme us.com...
NEWS wrote:
if I want to change a tag with CSS with a file rather than having all the
CSS code on the HTML doc I know I can do the following

<SNIPPET>
</SNIPPET>

Then I can use

<link href="../CSS/testStyle.css" rel="stylesheet " type="text/css">

if testStyle.css is the file

How do I use this in the HTML file?


Put the styles in a styleblock in the <head> of the HTML file, like
so:

<style type="text/css">
body{
background:red;
color:green;
}
</style>

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -

Dec 23 '05 #5

"Johannes Koch" <ko**@w3develop ment.de> wrote in message
news:43******** *************** @authen.yellow. readfreenews.ne t...
NEWS wrote:
body.Wyght
{

[...]
link color: red; /* unvisited links */
visited color: blue ; /* visited links */
hover color: yellow; /* user hovers */
active color: lime; /* active links */
focus background: yellow;
}


No, that's syntacically incorrect. Write

body.Wyght a:link {
color: red; /* unvisited links */
}
body.Wyght a:visited {
color: blue; /* visited links */
}
body.Wyght a:hover {
color: yellow; /* user hovers */
}
body.Wyght a:active {
color: lime; /* active links */
}
body.Wyght a:focus {
background: yellow;
}

instead.
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)

Dec 23 '05 #6

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

Similar topics

7
7111
by: varois83 | last post by:
Hi I am fairly new to PHP/mysql and was reading an online tutorial and learned that my short tags weren't enabled. At this time I have no need for them, my setup apache/mysql/php runs on my PC just to test code. Shall I enable short tags or not? Windows XP pro PHP 4
0
1193
by: Philippe Poulard | last post by:
People that have a knowledge of XQuery, XSLT, Ant, JSP/PHP/ASP, Cocoon, XMLBeans, taglibs and many others should recognize any of them in "Active Tags". " Active Tags is a set of specifications that allow to use XML tags as actions to perform. Active Tags specifies a framework for XML Native Programming where usual procedure-oriented sentences can be mixed with declarative sentences. Active Tags tightly integrates XML technologies in an...
24
3557
by: Day Bird Loft | last post by:
Web Authoring | Meta-Tags The first thing to understand in regard to Meta Tags is the three most important tags placed in the head of your html documents. They are the title, description, and keyword meta-tags. If you are missing any of these meta-tags you are missing the boat. If you use the following meta-tag formula, and you are not trying to deceive the spiders, I guarantee you will succeed in increasing your placement in the...
7
2005
by: Jasper Bryant-Greene | last post by:
I have three tables: `photos`, `tags` and `tags_photos`. The `photos` table contains a unique ID and a bunch of other stuff, the `tags` table contains a unique ID and a tag name, and the `tags_photos` contains the photo ID and the tag ID for an association between a tag and a photo. In other words, any photo may have many tags and any tag may have many photos.
1
2181
by: Jenny | last post by:
Hi, Can I create an array of tags by assigning same name to these tags? For example, I have two <p> tags with the same name t1. But document.all.b.value=document.all.t.length does not work. It works if the tags are <input type=radio...>. This line is OK:
12
5233
by: Oberon | last post by:
I have a large HTML document. It has hundreds of <span>s which have no attributes so these <span>s are redundant. How can I remove these tags automatically? The document also has <span>s with style attributes that I don't want to remove.
12
17119
by: Stefan Weiss | last post by:
Hi. (this is somewhat similar to yesterday's thread about empty links) I noticed that Tidy issues warnings whenever it encounters empty tags, and strips those tags if cleanup was requested. This is okay in some cases (such as <tbody>), but problematic for other tags (such as <option>). Some tags (td, th, ...) do not produce warnings when they are empty.
23
3105
by: Big Bill | last post by:
http://www.promcars.co.uk/pages/bonnie.php I don't believe they should be there, can I take them out without stopping the includes from functioning? I'm the (hapless) optimiser on this one... I have to correct where they've spelled my name wrong too...sigh... BB --
3
3708
by: Paul Moore | last post by:
I'd like to write some scripts to analyze and manipulate my music files. The files themselves are in MP3 and FLAC format (mostly MP3, but FLAC where I ripped original CDs and wanted a lossless format). I've no idea what form of tags are used in the files (ID3v1, ID3v2, OGG, APE, ...) I just used whatever the program that set them up used. I'm completely confused by the various tag formats that exist - there seems to be little...
1
7138
by: arrival123 | last post by:
Hello, I'm currently trying to decide on a database design for tags in my web 2.0 application. The problem I'm facing is that I have 3 separate tables i.e. cars, planes, and schools. All three tables need to interact with the tags, so there will only be one universal set of tags for the three tables. I read a lot about tags and the best articles I found were: Road to Web 2.0 ( http://wyome.com/docs/Road_to_Web_2.0:_The_Database_Design )...
0
9708
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...
1
10327
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,...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7625
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
6857
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
5527
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
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
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
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.