Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Some missing Font Elements in CSS giving me probelms



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> HTML Forum
View previous topic :: View next topic  
Author Message
hemanthjava



Joined: 06 Oct 2006
Posts: 1

PostPosted: Fri Oct 06, 2006 3:16 am    Post subject: Some missing Font Elements in CSS giving me probelms Reply with quote

I downloaded a free CSS template which I am using for my Website namely http://www.java-swing-tutorial.com

Now I ran the HTML Validator for my site using the Validator located at

http://validator.w3.org/

I am getting huge number of errors with respeck to font and font attributes that are not present in the css which is giving me hell lot of errors.

How do I include them in my css. Please let me know what changes I need to make in my css file. I am hereby sending you the css link as below.

http://www.java-swing-tutorial.com/default.zip

Regards,
Hemanth
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
johneva
500+ Club


Joined: 29 Oct 2005
Posts: 561
Location: Stafford, England

PostPosted: Fri Oct 06, 2006 12:36 pm    Post subject: Re: Some missing Font Elements in CSS giving me probelms Reply with quote

Right I have just took a quick look at your site and ran the validators for both CSS and HTML/XHTML and the CSS one wont give any results yet as the HTML/XHTML file is not valid yet.

The main problem which I think is what you were trying to explain is the use of the font tag which does not exsit anymore in valid XHTML.


You can just set properties for existing tags like the H1 tag. (Shown below) This way all you do then is use the H1 tag as normal and it will be diplayed as the CSS properties have been set.

Code:

h1 {
     color: #e0e0e0;
     background-color: #000;
}




But sometimes you want to have diffrent properties for the same tag (as in two diffrent sections of text both inside the P tag) to get around this you will need to make a class and set the properties in css either at the head of the doc or even better in a seperate CSS file and the refer to that class in your HTML/XHTML

The CSS would look like so.

Code:


.redtext {
     color: #f00;
     background-color: #000;
}

.bluetext {
     color: #0f0;
     background-color: #000;
}


Then your HTML/XHTML woul be like so.

Code:

<p class="redtext">Text here will be red</p>
<p class="bluetext">Text here will be blue</p>


Here are a couple of sites that have loads of CSS tutorials.

http://www.htmldog.com
http://www.w3schools.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> HTML Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap