944,031 Members | Top Members by Rank

Ad:
Aug 12th, 2005
0

What is wrong wtih my css?

Expand Post »
I am stuck. For some reason, my external css will only affect my links on my site. The color and hover color will change when i change it in the css. What is weird is the links are even coming from a php file <? require_once("NavigationTemplate.php");?>

The problem is that my font-size and family will not change when i change it in the css. can someone tell me what is wrong. here is the css and html code:

textandlinks.css
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. font-family: arial, helvetica, verdana, sans-serif;
  2. font-size: 12px;
  3. font-style: normal;
  4. line-height: normal;
  5. font-weight: normal;
  6. font-variant: normal;
  7. text-transform: none;
  8. color: #000000;
  9. a:link {color: #0000FF}
  10. a:visited {color: #0000FF}
  11. a:hover {color: #FF00FF}
  12. a:active {color: #0000FF}
  13. h1 {font-size: 16px; font-style: italic}
  14. h2 {font-size: 12px; font-style: italic}
  15. p {font-size: 12; font-style: normal; font-family: arial, helvetica, verdana, sans-serif}


html code:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <?
  2. require_once("conn.php");
  3. require_once("includes.php");
  4.  
  5. ?>
  6.  
  7. <html>
  8. <head>
  9. <title>Indie Music, Music Promotion and Music Resource at N2Ads.com</title>
  10. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  11. <META NAME="DESCRIPTION" CONTENT="<?=$aset[SiteDescription]?>">
  12. <META NAME="KEYWORDS" CONTENT="<?=$aset[SiteKeywords]?>">
  13. <META name="robots" content="Index,Follow">
  14.  
  15.  
  16.  
  17. <script language="JavaScript">
  18.  
  19. function CheckSearch() {
  20.  
  21. if(document.f1.what.value=="")
  22. {
  23. window.alert('Enter the search criteria, please!');
  24. document.f1.what.focus();
  25. return false;
  26. }
  27.  
  28. }
  29.  
  30. function CheckFriend() {
  31.  
  32. if(document.sfriend.f1.value=="")
  33. {
  34. window.alert('Enter your email address!');
  35. document.sfriend.f1.focus();
  36. return false;
  37. }
  38.  
  39. if(document.sfriend.f2.value=="")
  40. {
  41. window.alert('Enter your friend email address!');
  42. document.sfriend.f2.focus();
  43. return false;
  44. }
  45.  
  46. }
  47.  
  48. function CheckLogin() {
  49.  
  50. if(document.lform.us.value=="")
  51. {
  52. window.alert('Enter your username, please!');
  53. document.lform.us.focus();
  54. return false;
  55. }
  56.  
  57. if(document.lform.ps.value=="")
  58. {
  59. window.alert('Enter your password, please!');
  60. document.lform.ps.focus();
  61. return false;
  62. }
  63.  
  64. }
  65.  
  66. function CheckForgot() {
  67.  
  68. if(document.ForgotForm.u2.value=="")
  69. {
  70. window.alert('Enter your username, please!');
  71. document.ForgotForm.u2.focus();
  72. return false;
  73. }
  74. }
  75.  
  76. function CheckRegister() {
  77.  
  78. if(document.RegForm.NewUsername.value=="")
  79. {
  80. window.alert('Enter your username, please!');
  81. document.RegForm.NewUsername.focus();
  82. return false;
  83. }
  84.  
  85. if(document.RegForm.p1.value=="")
  86. {
  87. window.alert('Enter your password, please!');
  88. document.RegForm.p1.focus();
  89. return false;
  90. }
  91.  
  92. if(document.RegForm.p2.value=="")
  93. {
  94. window.alert('Confirm your password, please!');
  95. document.RegForm.p2.focus();
  96. return false;
  97. }
  98.  
  99. if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value)
  100. {
  101. window.alert('Enter and confirm your password again!');
  102. document.RegForm.p1.value="";
  103. document.RegForm.p2.value="";
  104. document.RegForm.p1.focus();
  105. return false;
  106. }
  107.  
  108. if(document.RegForm.FirstName.value=="")
  109. {
  110. window.alert('Enter your First Name, please!');
  111. document.RegForm.FirstName.focus();
  112. return false;
  113. }
  114.  
  115. if(document.RegForm.LastName.value=="")
  116. {
  117. window.alert('Enter your Last Name, please!');
  118. document.RegForm.LastName.focus();
  119. return false;
  120. }
  121.  
  122. if(document.RegForm.phone.value=="")
  123. {
  124. window.alert('Enter your Phone, please!');
  125. document.RegForm.phone.focus();
  126. return false;
  127. }
  128.  
  129. if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value))
  130. {
  131. return true;
  132. }
  133.  
  134. alert("Invalid E-mail Address! Please re-enter.");
  135. document.RegForm.email.focus();
  136. return false;
  137.  
  138.  
  139. }
  140.  
  141. function CheckProfile() {
  142.  
  143. if(document.RegForm.p1.value=="")
  144. {
  145. window.alert('Enter your password, please!');
  146. document.RegForm.p1.focus();
  147. return false;
  148. }
  149.  
  150. if(document.RegForm.p2.value=="")
  151. {
  152. window.alert('Confirm your password, please!');
  153. document.RegForm.p2.focus();
  154. return false;
  155. }
  156.  
  157. if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value)
  158. {
  159. window.alert('Enter and confirm your password again!');
  160. document.RegForm.p1.value="";
  161. document.RegForm.p2.value="";
  162. document.RegForm.p1.focus();
  163. return false;
  164. }
  165.  
  166. if(document.RegForm.FirstName.value=="")
  167. {
  168. window.alert('Enter your First Name, please!');
  169. document.RegForm.FirstName.focus();
  170. return false;
  171. }
  172.  
  173. if(document.RegForm.LastName.value=="")
  174. {
  175. window.alert('Enter your Last Name, please!');
  176. document.RegForm.LastName.focus();
  177. return false;
  178. }
  179.  
  180. if(document.RegForm.phone.value=="")
  181. {
  182. window.alert('Enter your Phone, please!');
  183. document.RegForm.phone.focus();
  184. return false;
  185. }
  186.  
  187. if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value))
  188. {
  189. return true;
  190. }
  191.  
  192. alert("Invalid E-mail Address! Please re-enter.");
  193. document.RegForm.email.focus();
  194. return false;
  195.  
  196. }
  197.  
  198. function CheckOffer() {
  199.  
  200. if(document.PostForm.SelectCategory.value=="")
  201. {
  202. alert('Select the category in which your offer will appear!');
  203. document.PostForm.SelectCategory.focus();
  204. return false;
  205. }
  206.  
  207. if(document.PostForm.address.value=="")
  208. {
  209. alert('Enter the property address, please!');
  210. document.PostForm.address.focus();
  211. return false;
  212. }
  213.  
  214. if(document.PostForm.city.value=="")
  215. {
  216. alert('Enter the property city, please!');
  217. document.PostForm.city.focus();
  218. return false;
  219. }
  220.  
  221. if(document.PostForm.state.value=="")
  222. {
  223. alert('Enter the property state, please!');
  224. document.PostForm.state.focus();
  225. return false;
  226. }
  227.  
  228. if(document.PostForm.country.value=="")
  229. {
  230. alert('Enter the property country, please!');
  231. document.PostForm.country.focus();
  232. return false;
  233. }
  234.  
  235. if(document.PostForm.ShortDesc.value=="")
  236. {
  237. alert('Enter the property short description, please!');
  238. document.PostForm.ShortDesc.focus();
  239. return false;
  240. }
  241.  
  242. if(document.PostForm.DetailedDesc.value=="")
  243. {
  244. alert('Enter the property detailed description, please!');
  245. document.PostForm.DetailedDesc.focus();
  246. return false;
  247. }
  248.  
  249. if(document.PostForm.Price.value=="")
  250. {
  251. alert('Enter the property price, please!');
  252. document.PostForm.Price.focus();
  253. return false;
  254. }
  255.  
  256. if(document.PostForm.PropertyType.value=="")
  257. {
  258. alert('Select the property type, please!');
  259. document.PostForm.PropertyType.focus();
  260. return false;
  261. }
  262.  
  263. if(document.PostForm.rooms.value=="")
  264. {
  265. alert('Enter the number of bedrooms, please!');
  266. document.PostForm.rooms.focus();
  267. return false;
  268. }
  269.  
  270. if(document.PostForm.bathrooms.value=="")
  271. {
  272. alert('Enter the number of bathrooms, please!');
  273. document.PostForm.bathrooms.focus();
  274. return false;
  275. }
  276.  
  277. }
  278.  
  279. </script>
  280.  
  281. <link href="textandlinks.css" rel="stylesheet" type="text/css">
  282.  
  283. </head>
  284. <body bgcolor="#FFFFFF">
  285. <table width="810" height="800" border="0" align="center" cellpadding="0">
  286. <tr>
  287. <td width="813" height="134" colspan="2" align="left" valign="top">
  288. <?
  289. require_once("TopBannerTemplate.php");
  290. ?>
  291. </td>
  292. </tr>
  293. <tr>
  294. <td height="809" colspan="2" align="left" valign="top"> <table width="805" height="811" border="0" cellpadding="0">
  295. <tr>
  296. <td width="120" height="662" align="left" valign="top" bgcolor="#FFFFFF">
  297. <?
  298. require_once("AdvertisementTemplate.php");
  299. ?> </td>
  300. <td width="537" align="left" valign="top" bgcolor="#FFFFFF"><table width="525" border="0" align="left" cellpadding="5">
  301. <tr>
  302. <td width="1533" height="45" colspan="3" align="left" valign="top"><img src="images/n2ads.gif" alt="indie music" width="470" height="35"></td>
  303. </tr>
  304. <tr>
  305. <td height="565" colspan="3" align="left" valign="top"> <table width="515" height="606" border="0" cellpadding="10">
  306. <tr>
  307. <td width="487" height="124" align="left" valign="top">
  308. <h1><font face="Arial, Helvetica, sans-serif">Your online
  309. Music Resource for Indie Music and Music Promotion!</h1>
  310. <p><em>&quot;At N2Ads.com we are dedicated to being the
  311. best Music Resource for Indie Music and Music Promotion,&quot;
  312. Stephen Hockman, President of N2Ads.</em></p>
  313. <p><strong>• As a Music Fan,</strong> we invite
  314. you to learn more about our Artists and Groups by checking
  315. out our Artist Directory. In there, you can read Artist
  316. bio's and descriptions, browse photos, and listen to
  317. mp3's. You should also check out our Upcoming Shows
  318. area to get info about Indie Music Artists that are
  319. playing in your area. </p>
  320. <p>• <strong>As a Music Artist,</strong> we invite
  321. you to visit our Music Resources page to learn tips
  322. on maximizing your own group's success. You will find
  323. a ton of articles that pertain to marketing, promoting,
  324. and spicing up your music. You should also get the word
  325. out about your own group by Registering it with us today!
  326. You will get your own Artist Profile, a listing in our
  327. Artist Directory, access to list your shows on our Upcoming
  328. Shows database, free promotion on our website, and much,
  329. much more! Just click on the Register link to find out
  330. more! </p>
  331. <p><strong><em>N2Ads.com - Provided for and created by
  332. Indie Music Fans and Artists! Spread the word and spread
  333. the tunes.</em></strong></p></td>
  334. </tr>
  335. <tr>
  336. <td height="8" align="left" valign="top"><a href="http://www.n2ads.com/artist_directory.php"><img src="images/artist-directory-block.gif" alt="indie music" width="515" height="93" border="0"></a>
  337. </td>
  338. </tr>
  339. <tr>
  340. <td height="3" align="left" valign="top"><a href="http://www.n2ads.com/resources.php"><img src="images/industry-resources-block.gif" alt="music promotion" width="515" height="93" border="0"></a></td>
  341. </tr>
  342. <tr>
  343. <td height="0" align="left" valign="top"><a href="http://www.n2ads.com/upcoming_shows.php"><img src="images/upcoming-shows-block.gif" alt="nusic resource" width="515" height="93" border="0"></a></td>
  344. </tr>
  345. <tr>
  346. <td height="1" align="left" valign="top"><a href="http://www.n2ads.com/register.php"><img src="images/register-block.gif" alt="music promotion" width="515" height="93" border="0"></a></td>
  347. </tr>
  348. </table></td>
  349. </tr>
  350. </table></td>
  351. <td width="121" align="right" valign="top" bgcolor="#FFFFFF"><a href="http://click.linksynergy.com/fs-bin/click?id=BJT2btL8ANs&offerid=89428.10000019&type=4&subid=0" target="new">
  352. </a> <?
  353. require_once("NavigationTemplate.php");
  354. ?> </td>
  355. </tr>
  356. <tr align="center" valign="top">
  357. <td height="94" colspan="3">
  358. <?
  359. require_once("FooterTemplate2.php");
  360. ?>
  361. <font size="1">Every Artist and Group needs Music Promotion. At N2Ads.com,
  362. we are dedicated to being the best Music Resource for Indie Music
  363. and Music Promotion. <br>
  364. <font color="#FFFFFF">.</font></font></td>
  365. </tr>
  366. </table></td>
  367. </tr>
  368. </table>
  369. </body>
  370. </html>
  371.  
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
n2ads is offline Offline
23 posts
since May 2005
Aug 12th, 2005
0

Re: What is wrong wtih my css?

eh, im not sure what's exactly is not working right... besides your main <H1> tag. but I did find 2 problems.
the first problem is you have a syntax error in your css file. you forgot the body {}
this is what it should look like.
body{
font-family: arial, helvetica, verdana, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
}
a:link {color: #0000FF}
a:visited {color: #0000FF}
a:hover {color: #FF00FF}
a:active {color: #0000FF}
h1 {font-size: 16px; font-style: italic}
h2 {font-size: 12px; font-style: italic}
p {font-size: 12px; font-family: arial, helvetica, verdana, sans-serif}
-------------------------------------------------------------
2nd on line 309 of your php file you have
<h1><font face="Arial, Helvetica, sans-serif">Your online
where is the closing </font> tag? I see near the bottom but they both have an opening tag.
Reputation Points: 15
Solved Threads: 10
Unverified User
BinaryMayhem is offline Offline
173 posts
since Jun 2004
Aug 12th, 2005
0

Re: What is wrong wtih my css?

I fixed my css file. but the h1 and links are the only that that works. if i change anything related to font size or h2 nothing happens.

it is now:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1.  
  2. .textandlinks{
  3. font-family: arial, helvetica, verdana, sans-serif;
  4. font-size: 5px;
  5. font-style: normal;
  6. line-height: normal;
  7. font-weight: normal;
  8. font-variant: normal;
  9. text-transform: none;
  10. color: #000000;
  11.  
  12. p {font-size: 5px; font-family: arial, helvetica, verdana, sans-serif}
  13. a:link {color: #0000FF}
  14. a:visited {color: #0000FF}
  15. a:hover {color: #FF00FF}
  16. a:active {color: #0000FF}
  17.  
  18. h1 {font-size: 5px; font-style: italic}
Reputation Points: 10
Solved Threads: 0
Newbie Poster
n2ads is offline Offline
23 posts
since May 2005
Aug 12th, 2005
0

Fixed It!!

I FIXED IT. DID SOME SEARCHING AND HERE IS WHAT WORKS:::

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1.  
  2. BODY,P,TR,TD {font:normal 10pt Arial, verdana, sans-serif;}
  3. h1 {font-size: 12pt; font-style: italic}
  4. h2 {font-size: 12pt; font-style: italic}
  5.  
  6. a {font-family: Arial, Verdana, sans-serif; font-size: 10pt; color: #000000;}
  7. a:link {color: #000000}
  8. a:visited {color: #0000FF}
  9. a:hover {color: #FF00FF}
  10. a:active {color: #0000FF}
Reputation Points: 10
Solved Threads: 0
Newbie Poster
n2ads is offline Offline
23 posts
since May 2005
Aug 12th, 2005
0

Re: What is wrong wtih my css?

almost... you keep forget the closing brace tho!!!!
.textandlinks{
font-family: arial, helvetica, verdana, sans-serif;
font-size: 5px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
}
p {font-size: 5px; font-family: arial, helvetica, verdana, sans-serif}
a:link {color: #0000FF}
a:visited {color: #0000FF}
a:hover {color: #FF00FF}
a:active {color: #0000FF}

h1 {font-size: 5px; font-style: italic}
Reputation Points: 15
Solved Threads: 10
Unverified User
BinaryMayhem is offline Offline
173 posts
since Jun 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Javascript Progress Bar flickers
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: How to make javascript form autochange - "Onchange"?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC