BoyWander
04-19-2011, 06:09 AM
Well I have basically designed a 7 page website with user logins, without a .css file.
I have just been putting all the css right after the <div id="x"><style>#x {} and such.
But I have finally found a reason to make a css file to be included in my whole site, and it has to do with a background gradient color.
Here is the gradient code, it is in the <head>
<style type="text/css">
.css3gradient{width:100%;height:1200px;
background-color:#ffffff;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#ffffff, endColorstr=#ffb300);
background-image:-moz-linear-gradient(top, #ffffff 0%, #ffb300 60%);
background-image:linear-gradient(top, #ffffff 0%, #ffb300 60%);
background-image:-webkit-gradient(linear, right top, right bottom, color-stop(0%,#ffffff), color-stop(60%,#ffb300));}
</style>
And then I have a
<div id="wrapper">
<div class="css3gradient">
I want to be able to change the color in the gradient for the whole site at will, without having to go through each page - it will also save in bandwidth usage, not having to dowload that code for every time seen.
I tried using <link etc.> and putting the gradient code in a background.css file but it ended up chopping off the first 15% or so of my webpage, as well as the bottom 15%. And the color didn't show up.
What am I doing wrong and how can I do this correctly?
Thanks for all your help.
BW
I have just been putting all the css right after the <div id="x"><style>#x {} and such.
But I have finally found a reason to make a css file to be included in my whole site, and it has to do with a background gradient color.
Here is the gradient code, it is in the <head>
<style type="text/css">
.css3gradient{width:100%;height:1200px;
background-color:#ffffff;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#ffffff, endColorstr=#ffb300);
background-image:-moz-linear-gradient(top, #ffffff 0%, #ffb300 60%);
background-image:linear-gradient(top, #ffffff 0%, #ffb300 60%);
background-image:-webkit-gradient(linear, right top, right bottom, color-stop(0%,#ffffff), color-stop(60%,#ffb300));}
</style>
And then I have a
<div id="wrapper">
<div class="css3gradient">
I want to be able to change the color in the gradient for the whole site at will, without having to go through each page - it will also save in bandwidth usage, not having to dowload that code for every time seen.
I tried using <link etc.> and putting the gradient code in a background.css file but it ended up chopping off the first 15% or so of my webpage, as well as the bottom 15%. And the color didn't show up.
What am I doing wrong and how can I do this correctly?
Thanks for all your help.
BW