i've looked around diff. css sites, but i can't quite figure out how to do this. What i want is to have a background image horizontaly aligned right but vertically, i want it centered. Also, fixed, no-repeat, and etc, but that doesnt matter.
I wish CSS was easier
I was thinking it should be something like background-vertical-alignment:center. That would be easy but i guess it doenst work that way.
Thanks<head>
<style type="text/css">
body {background: url("collage.jpg") center right fixed no-repeat}
</style>
</head>
<body>
</body>Originally posted by minulescu
I wish CSS was easier
I was thinking it should be something like background-vertical-alignment:center. That would be easy but i guess it doenst work that way.
Thanks [/B]
Yes it does, except that it's even easier then that. You don't need 2 different names for the alignment, you just specify 2 values after each other.
In Gil example above he has taken advantage on another CSS property that make it even still easier, setting all aspects at once simply uning background: and listing the options.
For a listing and description of all avalable options you can read this
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/colors.html#q2">http://www.w3.org/TR/REC-CSS2/colors.html#q2</a><!-- m -->
I wish CSS was easier
I was thinking it should be something like background-vertical-alignment:center. That would be easy but i guess it doenst work that way.
Thanks<head>
<style type="text/css">
body {background: url("collage.jpg") center right fixed no-repeat}
</style>
</head>
<body>
</body>Originally posted by minulescu
I wish CSS was easier
I was thinking it should be something like background-vertical-alignment:center. That would be easy but i guess it doenst work that way.
Thanks [/B]
Yes it does, except that it's even easier then that. You don't need 2 different names for the alignment, you just specify 2 values after each other.
In Gil example above he has taken advantage on another CSS property that make it even still easier, setting all aspects at once simply uning background: and listing the options.
For a listing and description of all avalable options you can read this
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/colors.html#q2">http://www.w3.org/TR/REC-CSS2/colors.html#q2</a><!-- m -->