| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
- Pages:
- 1
- 2
| WEB PAGE CODE HELP | |
|---|---|
| Tweet Topic Started: Jan 12 2005, 01:12 PM (1,264 Views) | |
| Ben | Jan 13 2005, 09:10 AM Post #16 |
|
Quantum-locked when observed.
![]()
|
You can put comment tags just inside the beginning and end of your style block so that older browsers will ignore it, but this causes validation errors. If you're using an external stylesheet, the best method is to use the @import way of calling the stylesheet.
If you want to embed actual comments about your CSS, use the same comment tags as Ali mentioned you use for JavaScript.
|
![]() |
|
| Rory | Jan 13 2005, 09:21 AM Post #17 |
|
i;m a mess
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Bluhd Relahyted, in this topic you have been just plain rude. Do not bump topics unless 24 hours have past. Be patient. |
![]() |
|
| Jory | Jan 13 2005, 10:14 AM Post #18 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
hmm... i think you guys shouldn't be bothering him with .css and js. he hardly knows html, so just learning that would be a lot easier. html code for backgroundcolor (somebody already gave it, but he seems to be ignored) <html> <head> <title>site name</title> </head> <BODY BGCOLOR="#FFFFFF"> text and stuff </body> </html> #FFFFFF=white colorcharts are not really hard to find. EDIT: forgot </head> :$ |
![]() |
|
| FearKiller | Jan 13 2005, 10:30 AM Post #19 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I believe the CSS still works with the comment tags in place, although I only tested them in the current versions of IE, Firefox, and Netscape, the CSS is rendered successfully and that was the way I was taught to use internal CSS. There have been cases where really old browsers that do not support CSS have rendered the page wrong because of the CSS. When the browser reaches the style tag it is clueless, but when it moves on to see the comment tags it'll recognize those and comment out the CSS.
Why would you want to break out of the style tag and display something before the CSS is actually finished? :huh: Why not use the CSS comment tags
A little test page with internal css using my method. http://www.fearkiller.net/test/internal.html The validation results for that page. http://validator.w3.org/check?uri=http%3A%...2Finternal.html Validation errors?
You also forgot the doctype and the character encoding. CSS isn't hard to learn and should be learned along with HTML. HTML alone doesn't give you as much freedom as if it was used with CSS. |
![]() |
|
| Ben | Jan 13 2005, 01:41 PM Post #20 |
|
Quantum-locked when observed.
![]()
|
Oops . . . I was talking about external stylesheets when I said validation errors. I learned that one the hard way ![]() For those who are just learning, I'm a little lenient when it comes to the use of HTML or CSS, but yes CSS is the preferred way to manipulate your background colours. If you teach both at the same time rather than one after the other, the transistion can probably be easier . . .
|
![]() |
|
| Wartorious | Jan 16 2005, 07:15 AM Post #21 |
|
Member
![]() ![]() ![]()
|
Hi man, go read a "basic HTML Guide for N00bs". It will tell you all you need to know, Just look for HTML Help on Google.com also look up web Templates, because otherwise the page won't look good enoth for visitors without you having any knowledge of HTML. Good luck man |
![]() |
|
| FearKiller | Jan 16 2005, 01:58 PM Post #22 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
He/she doesn't have to search google as I have already given an online tutorial on the first page that not only teaches HTML, but teaches it in the proper way that it should be used. |
![]() |
|
| The Legendary Sam | Jan 17 2005, 12:18 PM Post #23 |
|
Feck j00, mate!
![]() ![]() ![]() ![]() ![]()
|
He needs web page advice >.> If you want to make background color in the simplest way, you can do it without hex colors. EX:
That would be the simplest way, but you can aslo do this:
You can put the body background in a separate tag, and let the </body> tag close them both, or (the simplest way) just put body in the same bracket. You can also do combinations.
You can fit as much as you can and allow the </body> tag to close it all. I just made the webpage have a 70 pixle top margin and the background a simple red color. Don't forget, if you want more complex colors, you can use hex. Hex has 6 numbers: ######, they represent: RRGGBB. Red, Green, and Blue, which are the REAL Primary Colors. You can go from 00 to FF. FF represents 255 which is a widely used hex number. Why would it be hex if it is odd? Because the number is actually 256, however, we are counting 00 as a number in this case, but in other cases, where 00 is not applicable, we need all 256. FFF would be 65535, but that's not important ![]() If you want images as your background you can do this:
You can (once again) put it in the same, or different tag. But to cover over more browsers, it's best to get as raw as possible, because some concepts haven't been invented during older browsers. I use HTML 4.0, but that's not important ![]() If you want an image to fix itself into the background, meaning it will stay in the background even if the person scrolls down, then you put this:
TaDaa! There you go. And of course there's the linking image to site thing which was already explained.
Instead of putting text as the trigger, we put a link code inside the A brackets. There's also a somewhat complicated A Name trick that can bring you to the same page, but on a different line, but I won't get into that. I explained in detail the codes you wanted, and even niched around them a little, I hope this will help you make your web page. |
![]() |
|
| FearKiller | Jan 17 2005, 01:21 PM Post #24 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Thats what we gave him >.> You gave the old-fashioned way of using HTML. I gave the standards compliant way of using (X)HTML
is much better than...
Your code does not specify a doctype or a character encoding which are two very important and required attributes in order to validate your page. You also used HTML rather than CSS to style the page. CSS can give you alot more freedom than HTML ever could.
Why would you use two body tags? That is not correct HTML.
Topmargin only works properly in IE and "BG COLOR" does not work it's "bgcolor" Besides, there are much better ways of doing this with CSS.
It actually goes RRGGBB because #FF0000 represents a red, #00FF00 represents a green, and #0000FF represents a blue.
This code is also incorrect there is no "BACKGROUND IMG" it's just "background" and yet again I recommend CSS to do this.
I definetly should make an HTML tutorial
|
![]() |
|
| The Legendary Sam | Jan 17 2005, 01:46 PM Post #25 |
|
Feck j00, mate!
![]() ![]() ![]() ![]() ![]()
|
He said he doesn't want CSS help ![]() I don't know xHTML ![]() I did not use two body tags, the points is that I could get that done only using one ![]() Old fashioned? Yes. Simple and gets the job done? Yes. |
![]() |
|
| purge.exe | Jan 17 2005, 01:56 PM Post #26 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]()
|
Maybe not in the future :ph34r: It's good to have your document in pre-xhtml format. When the time comes to convert it to xHTML (if ever), it will be much easier to do. I like xHTML, purge.exe |
![]() |
|
| FearKiller | Jan 17 2005, 02:09 PM Post #27 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
If he doesn't want to use CSS then he can expect the freedom of styling and positioning his pages will be very limited.
:huh:
Parses slower than xhtml? Yes. Will most likely be obsolete in the near future so you'll have to update your page anyway? Yes. Is invalid code? Yes.
|
![]() |
|
| korn_mosher_4life-ZNS | Jan 17 2005, 02:10 PM Post #28 |
|
the korn mosher 4life
![]() ![]() ![]() ![]() ![]() ![]()
|
You don't have to have the doctype stuff in there. it's not in the syntax rules that you must so there for you dont need it. Also with the css, you would save your self alot of time if you just linked to a css file (just like a JS file) so if you need to change your background color or whatever you don't have to go to everypage and change it (so if you were UNT and have 8,000 web pages just simple change the hex code in one place.
Please save us and your self the time and don't. :yawn: |
![]() |
|
| FearKiller | Jan 17 2005, 02:20 PM Post #29 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Ok genius lets see you make a valid page without a doctype. If your page doesn't have a doctype, it will fall back and render your page as HTML 4.01 (not a good idea if your using XHTML 1.1.) I am also aware of the fact that you can link to an external style sheet as I explained on page one of this topic. <_< |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
- Pages:
- 1
- 2
| Track Topic · E-mail Topic |
6:43 PM Jul 11
|







![]](../../../../0/1/0/p601690/pipright.png)

6:43 PM Jul 11