make css apply to a chunk of html

Reply

Join Date: Oct 2006
Posts: 198
Reputation: MaxMumford is an unknown quantity at this point 
Solved Threads: 1
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Junior Poster

make css apply to a chunk of html

 
0
  #1
Nov 3rd, 2006
hi all!!

This is my text only back-up menu at the bottom of my page, but the colours from my origional external css sheet look bad on its background, so how do i make them a different colour? Here is the code for the hyperlink:

HTML and CSS Syntax (Toggle Plain Text)
  1. <tr>
  2. <td>&nbsp;</td>
  3. <td height="20" class="stylesheet3" valign="bottom" body><div align="center" ><font face="Arial, Helvetica, sans-serif"><a href="<a rel="nofollow" class="t" href="http://www.themepics.co.uk/" target="_blank"> http://www.themepics.co.uk/</a> " ><font size="-2"> Home</font> </a> <font size="-2">
  4. | <a href="<A href="http://www.themepics.co.uk/gallery">Gallery</a"> http://www.themepics.co.uk/gallery">Gallery</a> | <a href="<A href="http://www.themepics.co.uk/adobe%20photo%20gallery/adobe_gallery.htm">Adobe">http://www.themepics.co.uk/adobe%20photo%20gallery/adobe_gallery.htm">Adobe
  5. Gallery</a> | <a href="<A href="http://www.themepics.co.uk/art-packages"> Art">http://www.themepics.co.uk/art-packages">Art Packages</a>
  6. | <a href="<A href="http://www.themepics.co.uk/customise">Customise</a"> http://www.themepics.co.uk/customise">Customise</a> | <a href="<A href="http://www.themepics.co.uk/buy">Buy</a"> http://www.themepics.co.uk/buy">Buy</a>
  7. | <a href="<A href="http://www.themepics.co.uk/process">The">http://www.themepics.co.uk/process">The Process</a> | <a href="<A href="http://www.themepics.co.uk/offers"> Special">http://www.themepics.co.uk/offers">Special
  8. Offers</a> </font> </font> </div> </td>
  9. <td> &nbsp;</td>
  10. </tr>

Here is my css code that i have at the moment:

HTML and CSS Syntax (Toggle Plain Text)
  1. .stylesheet1 {
  2. font-family: arial;
  3. font-size: 12px;
  4. font-style: normal;
  5. line-height: normal;
  6. font-variant: normal;
  7. color: #000000;
  8. text-align: left;
  9. }
  10. a:link{
  11. color: #990000;
  12. text-decoration: none;
  13. }
  14. a:visited{
  15. color: #AF1E2D;
  16. text-decoration: none;
  17. }
  18. a:hover{
  19. color: #808080;
  20. text-decoration: underline;

and here is how i want the hyperlinks to look like:

HTML and CSS Syntax (Toggle Plain Text)
  1. a:link{
  2. color: #000000;
  3. text-decoration: none;
  4. }
  5. a:visited{
  6. color: #333333;
  7. text-decoration: none;
  8. }
  9. a:hover{
  10. color: #999999;
  11. text-decoration: underline;

Thanks!!!
Ill solve somebody's thread someday! xD
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 173
Reputation: BinaryMayhem is an unknown quantity at this point 
Solved Threads: 9
BinaryMayhem BinaryMayhem is offline Offline
Unverified User

Re: make css apply to a chunk of html

 
0
  #2
Nov 3rd, 2006
CSS:
HTML and CSS Syntax (Toggle Plain Text)
  1.  
  2. a.backup:link{
  3. color: #000000;
  4. text-decoration: none;
  5. }
  6. a.backup:visited{
  7. color: #333333;
  8. text-decoration: none;
  9. }
  10. a.backup:hover{
  11. color: #999999;
  12. text-decoration: underline;
HTML:
HTML and CSS Syntax (Toggle Plain Text)
  1.  
  2. <td height="20" class="stylesheet3" valign="bottom" body><div align="center" ><font face="Arial, Helvetica, sans-serif"><a class="backup" href="http://www.themepics.co.uk/" ><font size="-2">Home</font></a><font size="-2">
  3. | <a href="<A class="backup" href="http://www.themepics.co.uk/gallery"> Gallery</a">http://www.themepics.co.uk/gallery">Gallery</a> | <a class="backup" href="<A href="http://www.themepics.co.uk/adobe%20photo%20gallery/adobe_gallery.htm"> Adobe">http://www.themepics.co.uk/adobe%20photo%20gallery/adobe_gallery.htm">Adobe
  4. Gallery</a> | <a class="backup" href="<A href="http://www.themepics.co.uk/art-packages">Art">http://www.themepics.co.uk/art-packages">Art Packages</a>
  5. | <a href="<A class="backup" href="http://www.themepics.co.uk/customise"> Customise</a">http://www.themepics.co.uk/customise">Customise</a> | <a href="<A class="backup" href="http://www.themepics.co.uk/buy"> Buy</a">http://www.themepics.co.uk/buy">Buy</a>
  6. | <a href="<A class="backup" href="http://www.themepics.co.uk/process"> The">http://www.themepics.co.uk/process">The Process</a> | <a href="<A class="backup" href="http://www.themepics.co.uk/offers">Special">http://www.themepics.co.uk/offers">Special
  7. Offers</a></font></font></div></td>
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 198
Reputation: MaxMumford is an unknown quantity at this point 
Solved Threads: 1
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Junior Poster

Re: make css apply to a chunk of html

 
0
  #3
Nov 4th, 2006
[code<a href="<A class="backup" href="http://www.themepics.co.uk/gallery">[/code]
Ok cos there is a small glitch in the html i put class="backup" after the <a and before the href="... . I pasted the css into my style sheet i was using for the page, which already contains info about how my hyperlinks should be. this is what each of my things look like at the moment:
HTML and CSS Syntax (Toggle Plain Text)
  1. .stylesheet1 {
  2. font-family: arial;
  3. font-size: 12px;
  4. font-style: normal;
  5. line-height: normal;
  6. font-variant: normal;
  7. color: #000000;
  8. text-align: left;
  9. }
  10. a:link{
  11. color: #990000;
  12. text-decoration: none;
  13. }
  14. a:visited{
  15. color: #AF1E2D;
  16. text-decoration: none;
  17. }
  18. a:hover{
  19. color: #808080;
  20. text-decoration: underline;
  21. a.backup:link{
  22. color: #000000;
  23. text-decoration: none;
  24. }
  25. a.backup:visited{
  26. color: #333333;
  27. text-decoration: none;
  28. }
  29. a.backup:hover{
  30. color: #999999;
  31. text-decoration: underline;
  32. }

HTML and CSS Syntax (Toggle Plain Text)
  1. <td height="20" class="stylesheet3" valign="bottom" body><div align="center" ><font face="Arial, Helvetica, sans-serif"><a class="backup" href="<a rel="nofollow" class="t" href="http://www.themepics.co.uk/" target="_blank"> http://www.themepics.co.uk/</a> " ><font size="-2"> Home</font> </a> <font size="-2">
  2. | <a class="backup" href="<A href="http://www.themepics.co.uk/gallery">Gallery</a"> http://www.themepics.co.uk/gallery">Gallery</a> | <a class="backup" href="<A href="http://www.themepics.co.uk/adobe%20photo%20gallery/adobe_gallery.htm">Adobe">http://www.themepics.co.uk/adobe%20photo%20gallery/adobe_gallery.htm">Adobe
  3. Gallery</a> | <a class="backup" href="<A href="http://www.themepics.co.uk/art-packages"> Art">http://www.themepics.co.uk/art-packages">Art Packages</a>
  4. | <a class="backup" href="<A href="http://www.themepics.co.uk/customise">Customise</a"> http://www.themepics.co.uk/customise">Customise</a> | <a class="backup" href="<A href="http://www.themepics.co.uk/buy">Buy</a"> http://www.themepics.co.uk/buy">Buy</a>
  5. | <a class="backup" href="<A href="http://www.themepics.co.uk/process">The">http://www.themepics.co.uk/process">The Process</a> | <a class="backup" href="<A href="http://www.themepics.co.uk/offers"> Special">http://www.themepics.co.uk/offers">Special
  6. Offers</a> </font> </font> </div> </td>

Thanks again.
Ill solve somebody's thread someday! xD
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 173
Reputation: BinaryMayhem is an unknown quantity at this point 
Solved Threads: 9
BinaryMayhem BinaryMayhem is offline Offline
Unverified User

Re: make css apply to a chunk of html

 
0
  #4
Nov 4th, 2006
hmm, well I quickly edited the code you had and didn't really look at your HTML. it appears you had <A href="<a href="http://...">....</a>... </a>

you should really be neater with your html. also, font tags and tables are depreciated. you should be using all css. font-family:arial; font-size:medium;

any who, here is what you should have. I straigted it up really quick.
HTML and CSS Syntax (Toggle Plain Text)
  1. <td height="20" class="stylesheet3" valign="bottom" body><div align="center" ><font face="Arial, Helvetica, sans-serif">
  2. <a class="backup" href="http://www.themepics.co.uk/" >
  3. <font size="-2">Home</font></a><font size="-2">
  4. | <A class="backup" href="http://www.themepics.co.uk/gallery">Gallery</a">
  5. | <a class="backup" href="http://www.themepics.co.uk/adobe%20photo%20gallery/adobe_gallery.htm"> Adobe Gallery</a>
  6. | <A class="backup" href="http://www.themepics.co.uk/art-packages"> Art Packages</a>
  7. | <A class="backup" href="http://www.themepics.co.uk/customise"Customise</a>
  8. | <A class="backup" href="http://www.themepics.co.uk/buy"> Buy</a>
  9. | <A class="backup" href="http://www.themepics.co.uk/process"> The Process</a>
  10. | <A class="backup" href="http://www.themepics.co.uk/offers"> Special Offers</a>
  11. </font> </font> </div> </td>
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: make css apply to a chunk of html

 
0
  #5
Nov 4th, 2006
You mean "deprecated", right? Font tags are. Tables are not. For certain pages/applications, tables are still the best way to control layout. This forum (any forum) for instance, uses CSS extensively, but the overall structure of the site is tabular.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 173
Reputation: BinaryMayhem is an unknown quantity at this point 
Solved Threads: 9
BinaryMayhem BinaryMayhem is offline Offline
Unverified User

Re: make css apply to a chunk of html

 
0
  #6
Nov 4th, 2006
yes, I was mainly referring to the font tags, however; some people make it a habbit to lay a site out with tables when they should be using css.

Tables should be used to mark up truly tabular information ("data tables"). Content developers should avoid using them to lay out pages ("layout tables"). Tables for any use also present special problems to users of screen readers (refer to checkpoint 10.3).

http://www.w3.org/TR/WAI-WEBCONTENT/#gl-table-markup
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 198
Reputation: MaxMumford is an unknown quantity at this point 
Solved Threads: 1
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Junior Poster

Re: make css apply to a chunk of html

 
0
  #7
Nov 4th, 2006
Originally Posted by BinaryMayhem View Post
yes, I was mainly referring to the font tags, however; some people make it a habbit to lay a site out with tables when they should be using css.
oh well i dont really understand how to layout pages with css. I find tables are good because you can do things like make all text line up or have a pic as a border to a text box etc. Its also nice to use with templates on DWMX cos its very fast to edit.

Do you know of any good sites which can teach me to use css well?

thanks,
Max
Ill solve somebody's thread someday! xD
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 173
Reputation: BinaryMayhem is an unknown quantity at this point 
Solved Threads: 9
BinaryMayhem BinaryMayhem is offline Offline
Unverified User

Re: make css apply to a chunk of html

 
0
  #8
Nov 4th, 2006
your not gona learn css over night. it will take time and experince to understand what is going on. your best off learning from what other peoples work.

here are some quick links.

http://www.glish.com/css/
http://www.tjkdesign.com/articles/on...ss_layouts.asp
http://www.w3schools.com/css/default.asp
http://www.sitepoint.com/subcat/css
http://www.digital-web.com/articles/fluid_thinking/

everthing is working correctly now right?
good luck.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 198
Reputation: MaxMumford is an unknown quantity at this point 
Solved Threads: 1
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Junior Poster

Re: make css apply to a chunk of html

 
0
  #9
Nov 5th, 2006
well almost but ill try to learn it and do it myself because i will be able to use it in the future more thanks for your help.

Max.
Ill solve somebody's thread someday! xD
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: make css apply to a chunk of html

 
0
  #10
Nov 6th, 2006
Originally Posted by BinaryMayhem View Post
yes, I was mainly referring to the font tags, however; some people make it a habbit to lay a site out with tables when they should be using css.
i'm going to absolutely disagree with you (and the w3c/wai) there. content is data; and until there's an effective replacement for tables, there's no way to do certain things without them.

for example, to make a page that fills the horizontal width of a screen always, has blocks of text and fixed sized blocks:

tables expand downwards rather than jump underneath each other, if the text is huge, the table compensates and all other parts of the table reflect that, and they degrade well if you're careful. They separate a page into clear areas, and you know they'll always be in the correct (relative) position, rather than having to "lock" or "push" things into place with css, which imo should be something that other people can change safely without knowing the inner workings of the designer's mind.

EDIT: i gotta add, table cells in xhtml strict/xhtml transitional/html 4 strict/transitional are possibly the only blocks that support vertical-align:center; that's a big thing.

solutions i've seen to split pages up how i'd like with divs/css have tons more markup than solutions with tables and css.

that one line by the wai is somewhat overquoted... the w3c have a good side and a bad side.. the good side provides a wealth of technical information and guidelines, and brings unrelated projects into a cohesion... the bad side trys to promote those guidelines as irrefutable law.
Last edited by MattEvans; Nov 6th, 2006 at 3:15 pm.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC