View Full Version : css/html fragment help


vicary
05-05-2003, 02:17 AM
how do I add to this code in order to make the links be BOLD when hovered over (like a mouse-over).

<style type="text/css">
a {color: #2B81B7; font face: verdana;
text-decoration: none;}
</style>

Also, can I add individual codes as this to different text boxes in order to make each link inside the text boxs different colors/sizes/etc.?

I use Microsoft Publisher 2002.
I have to insert html code fragment boxes in order to add any html codes. Then it affects the whole page.

Hope someone can help me.
Thanks.
http://www.vicarybiznis.com/samplesite.htm

Elentari
05-05-2003, 02:41 AM
By using the following:

<style type="text/css">
A:link {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
}
A:visited {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
}
A:active {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
}
A:hover {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
font-weight:bold;
}
</style>


By adding the font-weight:bold; to the a:hover property.......also as you may see, I changed your font face to font-family....which is the proper way to denote a font using CSS

vicary
05-05-2003, 02:46 AM
It worked! I thank you so much! I have been working on this for hours and could not get it! You just saved me from mental anguish! LOL
Thank you so much!
Vicary

vicary
05-05-2003, 02:56 AM
How would I add the above post (css style sheet) to this html code fragment (in a text box) in Microsoft Publisher 02 in order for that css sheet to be specifically for this individual html code?

<table border="0" width="175" cellspacing="0" cellpadding="0"><FONT FACE="verdana"><FONT SIZE="2"><color="#000000">
<tr>
<a class="mnu" href="index.htm">Home Page</a><br>
<a class="mnu" href="faq.htm">FAQ</a><br>
<a class="mnu" href="bc.htm">Business Card Samples</a><br>
<a class="mnu" href="monologo.htm">Monograms/Logos</a><br>
<a class="mnu" href="smbus.htm">Small Businesses</a><br>
<a class="mnu" href="payments.htm">Payments</a><br>
<a class="mnu" href="contact.htm">Contact</a><br>
<a class="mnu" href="pricing.htm">Pricing Page</a><br>
<a class="mnu" href="letterheads.htm">Letterhead Costs</a><br>
<a class="mnu" href="envelopes.htm">Envelope Costs</a><br>
<a class="mnu" href="bccosts.htm">Business Card Costs</a><br>
<a class="mnu" href="bcdesigns1.htm">Business Card Designs 1</a><br>
<a class="mnu" href="bcdesigns2.htm">Business Card Designs 2</a><br>
<a class="mnu" href="bcdesigns3.htm">Business Card Designs 3</a><br>
<a class="mnu" href="packages.htm">Package Pricing</a><br>
<a class="mnu" href="mlpricing.htm">Monogram/Logo Pricing </a><br>
<a class="mnu" href="paperstocks.htm">Paper Stocks/Colors</a><br>
<a class="mnu" href="linen.htm">Royal Linen</a><br>
<a class="mnu" href="laid.htm">Royal Laid</a><br>
<a class="mnu" href="silk.htm">Royal Silk</a><br>
<a class="mnu" href="fiber.htm">Royal Fiber</a><br>
<a class="mnu" href="astrobrights.htm">Astrobrights</a><br>
<a class="mnu" href="astroparche.htm">Astroparche</a><br>
<a class="mnu" href="adddesigns.htm">Additional Designs</a><br>
<a class="mnu" target="_new" href="http://www.kconline.com">KConline</a><br>
<a class="mnu" target="_new" href="http://www.hummingbirdhosting.com/">Hummingbird Hosting</a><br>
<a class="mnu" target="_new" href="http://www.000domains.com">000domains</a></td>
</tr>

</tr>
</table>
</td>
</tr>
</table>


The learning here is just great!
Thanks all!
Vicary

Elentari
05-05-2003, 03:08 AM
No problem.

Well.........do you only want that to happen in the links that are inside the table or all links in the page?

If you want it for all links in the page just do this at the top of your page in between the head tags.....

<style type="text/css">
A:link {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
}
A:visited {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
}
A:active {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
}
A:hover {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
font-weight:bold;
}
</style>


..........


Now I have a couple of questions for you.

All those things inside the table are links right and you have them in a class meaning that you have something assigned to the class........to make the code easier, why don't you just add whatever it is that you are using in the class to the top bit. For example......if the reason you've set them up as a class is because you want them all to have a background colour of blue you just add this to the code I gave you..

<style type="text/css">
A:link {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
background-color:blue;
}
A:visited {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
background-color:blue;
}
A:active {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
background-color:blue;
}
A:hover {
color: #2B81B7;
font-family: verdana;
text-decoration: none;
font-weight:bold;
background-color:blue
}
</style>


By doing this, it's affecting all links but you don't have to do that class thing. You can add any code whether it be margin: padding or whatever in such a way. Makes the code easier.

If you have an example page I can look at I could help you better btw.

vicary
05-05-2003, 04:26 AM
to my web page by inserting an html code fragment box and then inserting the css code, but it affected all my links on the page. Since i use MSPublisher 2002 to create my site I have to do it this way. But I don't want it to affect my other text and links.

Here is a sample of the page I was working on:
http://www.vicarybiznis.com/samplesite.htm
Maybe you can then see what I am talking about.

But it also affected my "Paper Stocks Link" and I need to do this with different colors than my navigation bar on the left.
In MSpublisher, you have to insert text boxes and then highlight the text you want to inlclude links too and then insert a link that way. I found that I like inserting the css info into the html code fragment box better. But I am not sure how to go about doing that with my FAQ & TERMS text boxes on this page.

So, if anyone can help me, thanks a billion!
Vicary

Elentari
05-05-2003, 04:34 AM
Why don't you use frames for your layout, it's ideal for the type of layout you have. =)

Anyway........if you want it to be just those,......put a

table { at the beginning)

vicary
05-05-2003, 04:47 AM
I am not sure MSPublisher supports frames.
Here is what a publisher newsgroup answered for this question:
Publisher has no built in support for frames. You would have to code the framesets yourself with an html editor.
So, if I can somehow insert the frames into the html code fragment box and then insert them into publisher, then I think I would be able to use frames.
Does this make sense?
I appreciate all your help btw!
Thanks!

Elentari
05-05-2003, 04:57 AM
You should just get rid of publisher and use notepad.......with publisher you're limited and also you'll never fully learn.

Notepad is great.

vicary
05-05-2003, 05:42 AM
It seems like it took me forever to learn to redo one page today with all the css and that page was thesamplesite (http://www.vicarybiznis.com/samplesite.htm). My real site: http://www.vicarybiznis.com has about 30 pages and it is such a mess with so many different links right now within pages due to MSPublisher only allowing for 10 pages per website.
I am beginning to hate Publisher really, but am finding it so time consuming learning this. I keep running into problems to which I am so grateful the forum is here for and people such as yourself!

I may take your advice and start from the beginning...
Where would you suggest I start after viewing my site? I really don't know too much about html/css and all. But I am finding that I really like the css codes.

Thanks a billion to you!
Vicary

Elentari
05-05-2003, 06:57 AM
CSS is simple, it's mostly format and memory work.

To start you should do what I did. Open up notepad......then go to www.lissaexplains.com/css.shtml and cut and paste her whole mock CSS on there. Then, start filling in the variables with your own and save the file as something like index.html and there's your first page. =) Great way to start. Later on, when you find you want to do specific things, you just look it up and it's a lot easier because once you how the CSS format and how it's laid out and how it works, figuring out new things is simple. =)

If you'd like some help with converting your site to frames I'd be happy to help. I like doing layouts and stuff but I hate having to figure out content to pages, that's why my own page has an ever changing layout and is mostly geared towards downloadable layouts.

Elentari
05-05-2003, 07:57 AM
I just checked out your pages and I have nooooooooooooooooooo idea how you can deal with all that useless code and all that. I'd drive me nuts. I'm gonna do a mock up version of your page in frames so you can see how simple it can be.

vicary
05-05-2003, 10:49 AM
that all that garbage and seeing it is what confuses me! LOL I have never done html before and then when I view the source of my own website (using PUB.) it is frightening! LOL

Any help I could get as to even just the first & maybe even the 2nd page done in frames and such would be just marvelous! Maybe then I could learn a little better if someone could teach me how to start out with my site like that.
I have absolutely no problem with the learning, just that I am right now so confused about it. I tried to create one page up in wordpad and it came out all garbled up when I viewed it in IE. Nothing was in it's place. I didn't even know where to stick the pictures or anything.

Anyhow, again, you are soooo helpful!
TY
Vicary

Elentari
05-05-2003, 05:35 PM
I have tons to do today but I'll try to get around to set up your frameset page and the first page with your menu and content and then I'll explain how to change the rest of your pages and tada. I might not get around to it for a couple of days but I promise it'll be easy and I'll help as much as possib

vicary
05-06-2003, 03:52 AM
I appreciate your time! Thank you.
You can also email me directly if you wish...vicary@kconline.com
I didn't know how much of this forum we can use as for you helping me with this.
Sincerely,
Vicary

Elentari
05-06-2003, 04:26 PM
Do you have msn messenger?.......I'll be emailing you in about an hour with an example of your page in frames. =)

Elentari
05-06-2003, 06:56 PM
¬ Done - Waiting for you to contact me ¬

vicary
05-06-2003, 08:16 PM
vicarybiznis....is my name on there if you would like, you can IM me on there. I can download Trillian though as I believe that has MSN messenger on it as well as Yahoo and AIM.
Just let me know and how to contact you if you'd like.
Vicary

Elentari
05-08-2003, 04:39 AM
Just saw your other thread....

I have added you and emailed you and pm'd you on here to tell you that I'm just adding an explanation on the page and then I'm gonna email it to you.....so, hopefully you'll get this message since you don't seem to be getting any of my other ones. =)