hi, im completely new to .css - but in tutorials, its not clear at all how to use your own background, something as simple as that.
right now im using: (not .css)
<BODY background="location">
but seems only i see the background and no one else does lol.
Another question is that, a web page i just made = <!-- w --><a class="postlink" href="http://www.freewebs.com/wayne_styla/links.html">www.freewebs.com/wayne_styla/links.html</a><!-- w --> (just a mock website i made for my friends) and if it is not maximized.... and you resize the window - then the text breaks into different lines instead of getting a scrollbar at the bottom. Why is this?You can check out this link (<!-- m --><a class="postlink" href="http://www.w3schools.com/css/css_background.asp">http://www.w3schools.com/css/css_background.asp</a><!-- m -->) for some info on CSS backgrounds.
Now, from looking at the site, the reason other people aren't seeing the background is because you aren't linking to it properly. You'll need to have the image located on your web server; not your computer.
And the reason the text breaks up, is because it's just text, so naturally it will move around as you resize the window, so it's all viewable. Once you get into more complicated CSS layouts, you'll be confronted with the choice of designing a layout that won't break up at all like that, or a layout that will be fluid and will resize to fit the browser window and different resolutions.
<!-- m --><a class="postlink" href="http://www.w3schools.com/css/default.asp">http://www.w3schools.com/css/default.asp</a><!-- m --> is a good place to start out learning CSS. ahh, thanks m8.... ive been linked to that webbie before, so i suppose its bound to be good.... Originally posted by NewbieLearner
ahh, thanks m8.... ive been linked to that webbie before, so i suppose its bound to be good....
You're welcome.
Yup, that W3Schools place is pretty good. They've got tutorials on just about any language out there. yes w3schools is good stuff.
the syntax for a background would be
selector {background: url(location) color bottom/top left/right no/x/y-repeat?;}okies, thanks This link might also be useful:
CSS Reference (<!-- m --><a class="postlink" href="http://msdn.microsoft.com/library/default.asp?url=/workshop/author/css/reference/attributes.asp">http://msdn.microsoft.com/library/defau ... ibutes.asp</a><!-- m -->)
Down the page, check background, etc.
As CSS has matured, there's a great deal you can do with background images -- but for some reason, few developers have taken advantage of the capabilities.
A few idea scripts:
Background Images SlideShow (<!-- m --><a class="postlink" href="http://www.codelifter.com/main/javascript/2waybackslide.html">http://www.codelifter.com/main/javascri ... slide.html</a><!-- m -->)
Background Image Scroller - Vertical (<!-- m --><a class="postlink" href="http://www.codefoot.com/javascript/script_background_scroller.html">http://www.codefoot.com/javascript/scri ... oller.html</a><!-- m -->)
Background Image Scroller - Horizontal (<!-- m --><a class="postlink" href="http://www.codefoot.com/javascript/script_background_scroller_h.shtml">http://www.codefoot.com/javascript/scri ... er_h.shtml</a><!-- m -->)that isnt css. thats js.Originally posted by omega
the syntax for a background would be
selector {background: url(location) color bottom/top left/right no/x/y-repeat?;} Wrong order, though...
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-backgroundOriginally">http://www.w3.org/TR/REC-CSS2/colors.ht ... Originally</a><!-- m --> posted by omega
that isnt css. thats js.
If you can do that (scripts mentioned above) without CSS style properties I'd be interested in the technique.you can. css just makes it easier. and any pages that use cheapFX like that i dont look at, ill just X out.Originally posted by pyro
Wrong order, though...
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background">http://www.w3.org/TR/REC-CSS2/colors.ht ... background</a><!-- m -->
oh well. i just took that off the top of my head.Originally posted by omega
you can. css just makes it easier...
Would you perhaps be kind enought to show me how?Well I didn't review that script but I assume they use document.style.background, so they could just use document.body.background. it wouldn't be correct, per se, but it should work.Originally posted by pyro
Wrong order, though...
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background">http://www.w3.org/TR/REC-CSS2/colors.ht ... background</a><!-- m -->
Eh, really? I always did it like
<style type="text/css">
/*<![CDATA[*/
html, body {
background: url(images/background.jpg) #000 no-repeat fixed top center;
}
/*]]>*/
</style>
Image -> Color -> Repeat -> Attachment -> Position
That always worked...it may work but i think hes saying its not correct. like using bgcolor- it works, bbut its not right.Originally posted by omega
Well I didn't review that script but I assume they use document.style.background, so they could just use document.body.background. it wouldn't be correct, per se, but it should work.
How?Eh, thanks for the help guys, ive bookmarked the sites, nice debate Originally posted by NewbieLearner
Eh, thanks for the help guys, ive bookmarked the sites, nice debate
These "debates" tend to happen often and may get out of hand. Originally posted by Paul Jr
These "debates" tend to happen often and may get out of hand.
often? try always.The debates are fine, such as this thread, it's the getting off topic in every thread that needs to stop...hm.. i have no idea what you're talking about *innocent*
yeah, it seems every thread I'm in is off topic... yeah, it seems every thread I'm in is off topic...
lol, does this say anything? yes, but im always like that. pyros going to kill me one of these days.Originally posted by omega
it may work but i think hes saying its not correct. like using bgcolor- it works, bbut its not right.
I've been programming since 1966, so I do have just
a little experience... and a general maxim upon which
I and a great many colleagues agree goes more like
this, Omega:
If it works it must be right... lol.You're kidding me, right? Just because something works does not mean it's right...Originally posted by pyro
You're kidding me, right? Just because something works does not mean it's right...
Could you be kind enough to defend that viewpoint, please?Certainly.
Basically every language has it's own specifications. Take (X)HTML for instance. What does a <h1> tag mean/do? Does it simply mean large, bold text? Nope, not at all. <h1> tags should only be used to markup top-level headings. How about this:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:window.open("http://www.w3.org");">open</a>
Is that right? Nope, though it will work in browsers that hava JavaScript enabled. So the right way?
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.w3.org" onclick="window.open(this.href); return false;">open</a>
Why? A couple of reasons, really. First, javascript: is not a valid protocol for a URL, and while the first code will work in all browsers that I know of (providing they have JavaScirpt enabled). However, it uses an incorrect protocol for the URL, which means nothing is technically required to support it. The latter, of course, also has the added benefit of working when JavaScript is disabled, but that is a different issue.
How about you? Where are you coming from when you say if it works it's right?Yep
It's like you could breathe underwater, it would work, the surrounding atmosphere would be inhaled... but then you'd drown. So it'd work, but... yeah.
Oh and no commenting on the suckiness of my analogies.Originally posted by pyro
<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:window.open("http://www.w3.org");">open</a>
Is that right? Nope ...
That's example of what does not work (in browsers with JavaScript disabled).
I do not see how that contradicts my statement: If it works it must be right.Well, I guess that is true, if you aren't standards compliant.Originally posted by etLux
That's example of what does not work (in browsers with JavaScript disabled).
But if you had javascript enabled you wouldn't know it didn't work.
So how about a compromise:
If it works in all browsers at all times, and complies with the w3c, then it must be right.
so basically if its up to web standards....
right now im using: (not .css)
<BODY background="location">
but seems only i see the background and no one else does lol.
Another question is that, a web page i just made = <!-- w --><a class="postlink" href="http://www.freewebs.com/wayne_styla/links.html">www.freewebs.com/wayne_styla/links.html</a><!-- w --> (just a mock website i made for my friends) and if it is not maximized.... and you resize the window - then the text breaks into different lines instead of getting a scrollbar at the bottom. Why is this?You can check out this link (<!-- m --><a class="postlink" href="http://www.w3schools.com/css/css_background.asp">http://www.w3schools.com/css/css_background.asp</a><!-- m -->) for some info on CSS backgrounds.
Now, from looking at the site, the reason other people aren't seeing the background is because you aren't linking to it properly. You'll need to have the image located on your web server; not your computer.
And the reason the text breaks up, is because it's just text, so naturally it will move around as you resize the window, so it's all viewable. Once you get into more complicated CSS layouts, you'll be confronted with the choice of designing a layout that won't break up at all like that, or a layout that will be fluid and will resize to fit the browser window and different resolutions.
<!-- m --><a class="postlink" href="http://www.w3schools.com/css/default.asp">http://www.w3schools.com/css/default.asp</a><!-- m --> is a good place to start out learning CSS. ahh, thanks m8.... ive been linked to that webbie before, so i suppose its bound to be good.... Originally posted by NewbieLearner
ahh, thanks m8.... ive been linked to that webbie before, so i suppose its bound to be good....
You're welcome.
Yup, that W3Schools place is pretty good. They've got tutorials on just about any language out there. yes w3schools is good stuff.
the syntax for a background would be
selector {background: url(location) color bottom/top left/right no/x/y-repeat?;}okies, thanks This link might also be useful:
CSS Reference (<!-- m --><a class="postlink" href="http://msdn.microsoft.com/library/default.asp?url=/workshop/author/css/reference/attributes.asp">http://msdn.microsoft.com/library/defau ... ibutes.asp</a><!-- m -->)
Down the page, check background, etc.
As CSS has matured, there's a great deal you can do with background images -- but for some reason, few developers have taken advantage of the capabilities.
A few idea scripts:
Background Images SlideShow (<!-- m --><a class="postlink" href="http://www.codelifter.com/main/javascript/2waybackslide.html">http://www.codelifter.com/main/javascri ... slide.html</a><!-- m -->)
Background Image Scroller - Vertical (<!-- m --><a class="postlink" href="http://www.codefoot.com/javascript/script_background_scroller.html">http://www.codefoot.com/javascript/scri ... oller.html</a><!-- m -->)
Background Image Scroller - Horizontal (<!-- m --><a class="postlink" href="http://www.codefoot.com/javascript/script_background_scroller_h.shtml">http://www.codefoot.com/javascript/scri ... er_h.shtml</a><!-- m -->)that isnt css. thats js.Originally posted by omega
the syntax for a background would be
selector {background: url(location) color bottom/top left/right no/x/y-repeat?;} Wrong order, though...
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-backgroundOriginally">http://www.w3.org/TR/REC-CSS2/colors.ht ... Originally</a><!-- m --> posted by omega
that isnt css. thats js.
If you can do that (scripts mentioned above) without CSS style properties I'd be interested in the technique.you can. css just makes it easier. and any pages that use cheapFX like that i dont look at, ill just X out.Originally posted by pyro
Wrong order, though...
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background">http://www.w3.org/TR/REC-CSS2/colors.ht ... background</a><!-- m -->
oh well. i just took that off the top of my head.Originally posted by omega
you can. css just makes it easier...
Would you perhaps be kind enought to show me how?Well I didn't review that script but I assume they use document.style.background, so they could just use document.body.background. it wouldn't be correct, per se, but it should work.Originally posted by pyro
Wrong order, though...
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background">http://www.w3.org/TR/REC-CSS2/colors.ht ... background</a><!-- m -->
Eh, really? I always did it like
<style type="text/css">
/*<![CDATA[*/
html, body {
background: url(images/background.jpg) #000 no-repeat fixed top center;
}
/*]]>*/
</style>
Image -> Color -> Repeat -> Attachment -> Position
That always worked...it may work but i think hes saying its not correct. like using bgcolor- it works, bbut its not right.Originally posted by omega
Well I didn't review that script but I assume they use document.style.background, so they could just use document.body.background. it wouldn't be correct, per se, but it should work.
How?Eh, thanks for the help guys, ive bookmarked the sites, nice debate Originally posted by NewbieLearner
Eh, thanks for the help guys, ive bookmarked the sites, nice debate
These "debates" tend to happen often and may get out of hand. Originally posted by Paul Jr
These "debates" tend to happen often and may get out of hand.
often? try always.The debates are fine, such as this thread, it's the getting off topic in every thread that needs to stop...hm.. i have no idea what you're talking about *innocent*
yeah, it seems every thread I'm in is off topic... yeah, it seems every thread I'm in is off topic...
lol, does this say anything? yes, but im always like that. pyros going to kill me one of these days.Originally posted by omega
it may work but i think hes saying its not correct. like using bgcolor- it works, bbut its not right.
I've been programming since 1966, so I do have just
a little experience... and a general maxim upon which
I and a great many colleagues agree goes more like
this, Omega:
If it works it must be right... lol.You're kidding me, right? Just because something works does not mean it's right...Originally posted by pyro
You're kidding me, right? Just because something works does not mean it's right...
Could you be kind enough to defend that viewpoint, please?Certainly.
Basically every language has it's own specifications. Take (X)HTML for instance. What does a <h1> tag mean/do? Does it simply mean large, bold text? Nope, not at all. <h1> tags should only be used to markup top-level headings. How about this:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:window.open("http://www.w3.org");">open</a>
Is that right? Nope, though it will work in browsers that hava JavaScript enabled. So the right way?
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.w3.org" onclick="window.open(this.href); return false;">open</a>
Why? A couple of reasons, really. First, javascript: is not a valid protocol for a URL, and while the first code will work in all browsers that I know of (providing they have JavaScirpt enabled). However, it uses an incorrect protocol for the URL, which means nothing is technically required to support it. The latter, of course, also has the added benefit of working when JavaScript is disabled, but that is a different issue.
How about you? Where are you coming from when you say if it works it's right?Yep
It's like you could breathe underwater, it would work, the surrounding atmosphere would be inhaled... but then you'd drown. So it'd work, but... yeah.
Oh and no commenting on the suckiness of my analogies.Originally posted by pyro
<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:window.open("http://www.w3.org");">open</a>
Is that right? Nope ...
That's example of what does not work (in browsers with JavaScript disabled).
I do not see how that contradicts my statement: If it works it must be right.Well, I guess that is true, if you aren't standards compliant.Originally posted by etLux
That's example of what does not work (in browsers with JavaScript disabled).
But if you had javascript enabled you wouldn't know it didn't work.
So how about a compromise:
If it works in all browsers at all times, and complies with the w3c, then it must be right.
so basically if its up to web standards....