HTML to CSS coding !!!! Important !!!!?

2008-10-28 7:04 pm
i need to convert HTML into CSS codes for my homepage... how can i do that? please give the best/easiest way of doing it and FAST!!!
~Drift
更新1:

i see.... so thats the real deal lol

更新2:

hey ' the man the myth the answerer', can u tell me more about the background image? please? thats exactly what i'm trying to do :) thanks.

更新3:

thanks all of you for your kind help; i really appreciate it... :)

回答 (6)

2008-10-28 7:23 pm
✔ 最佳答案
not sure of the question but you will need to make either a seprate file and link it to the html page in the header section ( this is the best way imo so I want mention the others )

just figure out what you want if you want you background to be a certain image then in the css file you will create it that way like:


body{
background-image:url("bkgrdimg.jpeg");
}

if you want all the text to be blue and 12 font then just add

color:blue;
font-size: 12pt;

but If you already have the style inside the html just move it to the css file like if you have :

< table witdh ="100%" align ="center" border="4">

go to the css file and make it something like

.table1{
width:100%;
align:center;
border:4;
}

then go to the html page and change it to

<table id="table1">

hope this somewhat clears it up
2008-10-29 4:37 am
The fastest way:
1) Go thru your entire HTML file and take out all attributes. For example, if you have <body bgcolor="#fff"...> in your HTML file, take everything out so that it reads <body>

2) On a separate file, paste all the attributes you've taken out from your HTML file. This will be your .CSS file. Arrange these attributes so that it looks like this:
body {background: #fff url("image_file_source");}
p {color: #000; font-family: Arial;...}

3. Save this file as style.css and then go back to your HTML file and add the following line between the <head> and </head> tags:
<link rel="stylesheet" type="text/css" href="style.css">

There you go, now you have a separate HTML and CSS file. CSS is wonderful because now you can edit the appearance of your entire website without tampering with the HTML codes.
2008-10-29 2:17 am
Ain't gonna be done FAST! You will first have to learn and understand how to write CSS and then change you HTML page(s) to include the CSS. This will require several weeks, maybe months, of study -- depending on your ability to understand.

In essense, CSS is to be viewed as that which controls the format of your pages and HTML contains the content of your pages.
2008-10-29 2:11 am
It can't be explained in a couple sentences, there's a lot to know. Here's a good tutorial:
http://www.echoecho.com/css.htm
2008-10-29 2:10 am
HTML is a markup language,
CSS is a language used to tell the HTML how to be displayed.
2008-10-29 2:11 am
No conversion of all things. HTML is structure. CSS is presentation.

CSS cannot indicate a < body > -- that MUST be HTML!!!

HTML is "bones". CSS is "skin". Got it?


收錄日期: 2021-05-03 14:01:39
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20081028110459AAarmUQ

檢視 Wayback Machine 備份