| | |
What is wrong wtih my css?
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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
html code:
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)
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: 12; font-style: normal; font-family: arial, helvetica, verdana, sans-serif}
html code:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<? require_once("conn.php"); require_once("includes.php"); ?> <html> <head> <title>Indie Music, Music Promotion and Music Resource at N2Ads.com</title> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="DESCRIPTION" CONTENT="<?=$aset[SiteDescription]?>"> <META NAME="KEYWORDS" CONTENT="<?=$aset[SiteKeywords]?>"> <META name="robots" content="Index,Follow"> <script language="JavaScript"> function CheckSearch() { if(document.f1.what.value=="") { window.alert('Enter the search criteria, please!'); document.f1.what.focus(); return false; } } function CheckFriend() { if(document.sfriend.f1.value=="") { window.alert('Enter your email address!'); document.sfriend.f1.focus(); return false; } if(document.sfriend.f2.value=="") { window.alert('Enter your friend email address!'); document.sfriend.f2.focus(); return false; } } function CheckLogin() { if(document.lform.us.value=="") { window.alert('Enter your username, please!'); document.lform.us.focus(); return false; } if(document.lform.ps.value=="") { window.alert('Enter your password, please!'); document.lform.ps.focus(); return false; } } function CheckForgot() { if(document.ForgotForm.u2.value=="") { window.alert('Enter your username, please!'); document.ForgotForm.u2.focus(); return false; } } function CheckRegister() { if(document.RegForm.NewUsername.value=="") { window.alert('Enter your username, please!'); document.RegForm.NewUsername.focus(); return false; } if(document.RegForm.p1.value=="") { window.alert('Enter your password, please!'); document.RegForm.p1.focus(); return false; } if(document.RegForm.p2.value=="") { window.alert('Confirm your password, please!'); document.RegForm.p2.focus(); return false; } if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value) { window.alert('Enter and confirm your password again!'); document.RegForm.p1.value=""; document.RegForm.p2.value=""; document.RegForm.p1.focus(); return false; } if(document.RegForm.FirstName.value=="") { window.alert('Enter your First Name, please!'); document.RegForm.FirstName.focus(); return false; } if(document.RegForm.LastName.value=="") { window.alert('Enter your Last Name, please!'); document.RegForm.LastName.focus(); return false; } if(document.RegForm.phone.value=="") { window.alert('Enter your Phone, please!'); document.RegForm.phone.focus(); return false; } if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value)) { return true; } alert("Invalid E-mail Address! Please re-enter."); document.RegForm.email.focus(); return false; } function CheckProfile() { if(document.RegForm.p1.value=="") { window.alert('Enter your password, please!'); document.RegForm.p1.focus(); return false; } if(document.RegForm.p2.value=="") { window.alert('Confirm your password, please!'); document.RegForm.p2.focus(); return false; } if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value) { window.alert('Enter and confirm your password again!'); document.RegForm.p1.value=""; document.RegForm.p2.value=""; document.RegForm.p1.focus(); return false; } if(document.RegForm.FirstName.value=="") { window.alert('Enter your First Name, please!'); document.RegForm.FirstName.focus(); return false; } if(document.RegForm.LastName.value=="") { window.alert('Enter your Last Name, please!'); document.RegForm.LastName.focus(); return false; } if(document.RegForm.phone.value=="") { window.alert('Enter your Phone, please!'); document.RegForm.phone.focus(); return false; } if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value)) { return true; } alert("Invalid E-mail Address! Please re-enter."); document.RegForm.email.focus(); return false; } function CheckOffer() { if(document.PostForm.SelectCategory.value=="") { alert('Select the category in which your offer will appear!'); document.PostForm.SelectCategory.focus(); return false; } if(document.PostForm.address.value=="") { alert('Enter the property address, please!'); document.PostForm.address.focus(); return false; } if(document.PostForm.city.value=="") { alert('Enter the property city, please!'); document.PostForm.city.focus(); return false; } if(document.PostForm.state.value=="") { alert('Enter the property state, please!'); document.PostForm.state.focus(); return false; } if(document.PostForm.country.value=="") { alert('Enter the property country, please!'); document.PostForm.country.focus(); return false; } if(document.PostForm.ShortDesc.value=="") { alert('Enter the property short description, please!'); document.PostForm.ShortDesc.focus(); return false; } if(document.PostForm.DetailedDesc.value=="") { alert('Enter the property detailed description, please!'); document.PostForm.DetailedDesc.focus(); return false; } if(document.PostForm.Price.value=="") { alert('Enter the property price, please!'); document.PostForm.Price.focus(); return false; } if(document.PostForm.PropertyType.value=="") { alert('Select the property type, please!'); document.PostForm.PropertyType.focus(); return false; } if(document.PostForm.rooms.value=="") { alert('Enter the number of bedrooms, please!'); document.PostForm.rooms.focus(); return false; } if(document.PostForm.bathrooms.value=="") { alert('Enter the number of bathrooms, please!'); document.PostForm.bathrooms.focus(); return false; } } </script> <link href="textandlinks.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#FFFFFF"> <table width="810" height="800" border="0" align="center" cellpadding="0"> <tr> <td width="813" height="134" colspan="2" align="left" valign="top"> <? require_once("TopBannerTemplate.php"); ?> </td> </tr> <tr> <td height="809" colspan="2" align="left" valign="top"> <table width="805" height="811" border="0" cellpadding="0"> <tr> <td width="120" height="662" align="left" valign="top" bgcolor="#FFFFFF"> <? require_once("AdvertisementTemplate.php"); ?> </td> <td width="537" align="left" valign="top" bgcolor="#FFFFFF"><table width="525" border="0" align="left" cellpadding="5"> <tr> <td width="1533" height="45" colspan="3" align="left" valign="top"><img src="images/n2ads.gif" alt="indie music" width="470" height="35"></td> </tr> <tr> <td height="565" colspan="3" align="left" valign="top"> <table width="515" height="606" border="0" cellpadding="10"> <tr> <td width="487" height="124" align="left" valign="top"> <h1><font face="Arial, Helvetica, sans-serif">Your online Music Resource for Indie Music and Music Promotion!</h1> <p><em>"At N2Ads.com we are dedicated to being the best Music Resource for Indie Music and Music Promotion," Stephen Hockman, President of N2Ads.</em></p> <p><strong>• As a Music Fan,</strong> we invite you to learn more about our Artists and Groups by checking out our Artist Directory. In there, you can read Artist bio's and descriptions, browse photos, and listen to mp3's. You should also check out our Upcoming Shows area to get info about Indie Music Artists that are playing in your area. </p> <p>• <strong>As a Music Artist,</strong> we invite you to visit our Music Resources page to learn tips on maximizing your own group's success. You will find a ton of articles that pertain to marketing, promoting, and spicing up your music. You should also get the word out about your own group by Registering it with us today! You will get your own Artist Profile, a listing in our Artist Directory, access to list your shows on our Upcoming Shows database, free promotion on our website, and much, much more! Just click on the Register link to find out more! </p> <p><strong><em>N2Ads.com - Provided for and created by Indie Music Fans and Artists! Spread the word and spread the tunes.</em></strong></p></td> </tr> <tr> <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> </td> </tr> <tr> <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> </tr> <tr> <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> </tr> <tr> <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> </tr> </table></td> </tr> </table></td> <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"> </a> <? require_once("NavigationTemplate.php"); ?> </td> </tr> <tr align="center" valign="top"> <td height="94" colspan="3"> <? require_once("FooterTemplate2.php"); ?> <font size="1">Every Artist and Group needs Music Promotion. At N2Ads.com, we are dedicated to being the best Music Resource for Indie Music and Music Promotion. <br> <font color="#FFFFFF">.</font></font></td> </tr> </table></td> </tr> </table> </body> </html>
N2Ads.com - Your online source for Indie Music, Music Promotion, and Music Resources!
Provided for and created by Music Artists and Fans.
Provided for and created by Music Artists and Fans.
•
•
Join Date: Jun 2004
Posts: 173
Reputation:
Solved Threads: 9
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.
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.
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:
it is now:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
.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}
N2Ads.com - Your online source for Indie Music, Music Promotion, and Music Resources!
Provided for and created by Music Artists and Fans.
Provided for and created by Music Artists and Fans.
I FIXED IT. DID SOME SEARCHING AND HERE IS WHAT WORKS:::
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
BODY,P,TR,TD {font:normal 10pt Arial, verdana, sans-serif;} h1 {font-size: 12pt; font-style: italic} h2 {font-size: 12pt; font-style: italic} a {font-family: Arial, Verdana, sans-serif; font-size: 10pt; color: #000000;} a:link {color: #000000} a:visited {color: #0000FF} a:hover {color: #FF00FF} a:active {color: #0000FF}
N2Ads.com - Your online source for Indie Music, Music Promotion, and Music Resources!
Provided for and created by Music Artists and Fans.
Provided for and created by Music Artists and Fans.
•
•
Join Date: Jun 2004
Posts: 173
Reputation:
Solved Threads: 9
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}
.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}
![]() |
Similar Threads
- Layout Tables to CSS (HTML and CSS)
- Browser Display Issue, Please Help (HTML and CSS)
- Css floating problem (HTML and CSS)
- How can I fill the webpage (ASP.NET)
- Replacing 100% tables with CSS (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Javascript Progress Bar flickers
- Next Thread: How to make javascript form autochange - "Onchange"?
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array browser bug captchaformproblem cart checkbox child class close codes createrange() css cursor date debugger decimal dependent design disablefirebug dom dropdown editor element embed engine enter error events explorer ext file firefox focus form forms frameworks getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe images index internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl listbox maps masterpage math media menu mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post problem programming progressbar prototype redirect runtime safari scale scriptlets scroll search security shopping size software toggle unicode w3c web wysiwyg \n





