[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

css boggle

Posted on 2000-01-18
8
Medium Priority
?
217 Views
Last Modified: 2011-09-20
If i have the following link

<a class="link" href="http://localhost/cgi-bin/links/jump.cgi?ID=20" target="_blank">Some Page</a>

is it possible to assign the "some page" part to have another CSS style?
0
Comment
Question by:j2
  • 4
  • 4
8 Comments
 
LVL 5

Expert Comment

by:aarie
ID: 2362224
Yes... :)

Just change the class="link" to class="myclass" where myclass is your own style definition....

for example:
<style type="text/css">
..myclass
{
 font-family : Arial;
 font-weight : bold;
}
</style>

Arjan.
0
 
LVL 5

Expert Comment

by:aarie
ID: 2362226
See my comment...

Arjan.
0
 
LVL 12

Author Comment

by:j2
ID: 2362235
GAH, i pasted the WRONG code :)

<small class="date">(Tillagd: 21-Mar-1999 Träffar: 120  Betyg: 0 Röster: 0) <a href="http://www.localhost/cgi-bin/links/rate.cgi?ID=20">Betygsätt den</a></small>

i want the "betygsätt den" to have one class while maintaning the "date" class for the preceding text.

Sorry, my misstake. I am rejecting the answer since i made such a grave error in my Q. Feel free to reanswer it.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 5

Expert Comment

by:aarie
ID: 2362242
Almost forgot...

Each element can have only one style if I'm not mistaken...

Arjan.
0
 
LVL 12

Author Comment

by:j2
ID: 2362252
Yes, thats true. But since the href is its own tag, i should be able to style that as one objectm, and the preceding text as one object, right? I'm just not sure how to include a style tag in a href tag?
0
 
LVL 5

Accepted Solution

by:
aarie earned 200 total points
ID: 2362277
just change
<a href="http://www.localhost/cgi-bin/links/rate.cgi?ID=20">Betygsätt den</a>

to:

<a class="myclass" href="http://www.localhost/cgi-bin/links/rate.cgi?ID=20">Betygsätt den</a>

That way, the text "Betygsätt den" will have it's own style, as defined in "myclass"...

Arjan.
0
 
LVL 12

Author Comment

by:j2
ID: 2362282
I tried that, but it didnt work.. but now when someone else says it.. it makes sense that it has GOT to work.. gotta have an error in my stylesheet or something.. Ill give it a whack :)
0
 
LVL 12

Author Comment

by:j2
ID: 2363772
Yep, was a syntax error alright ;)
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question