Re: Background in my website

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Murray (forums_at_HAHAgreat-web-sights.com)
Date: 10/25/04


Date: Mon, 25 Oct 2004 14:40:21 -0400

My instructions to Novato will get you there, but if you want to do it
manually, you can do this -

<style type="text/css">
<!--
body { background: url(images/foo.jpg); background-repeat:no-repeat;
background-position:150px 200px; }
-->
</style>

- in the head of the document. The image will now be positioned as you
specify 150px from the left and 200px from the top, and will not repeat, so
that you get a single instance of it.

A cute use of this method is to create non-javascript, CSS rollover buttons.
You can see an example in the menu rollovers here -

http://www.midwestespresso.com

The rollover is actually just a CSS positioning of the background image -
you can see one of the images here -

http://www.midwestespresso.com/images/productline3.gif

Note that the "up" and the "over" states are both represented there. When
rolling over that button, the hover pseudo-class repositioned the background
image so that it shows the OVER state instead of the UP state, i.e.,

this -

#menu A:hover {
 BACKGROUND-POSITION: 0px -47px
}

instead of this -

#menu A {
 BACKGROUND-POSITION: 0px 1px;

In effect, the background image is just being moved up by 46px and then
back. Since that moves the image OUT of the space of the <a> tag, the
overflow is no longer visible.

-- 
Murray
"Chris27" <Chris27@discussions.microsoft.com> wrote in message 
news:2E5297E5-90F0-4FCD-B10D-889624E86B26@microsoft.com...
> Murray,
>
> your contributions are useful and appreciated
> Are you able to give an example of CSS to achieve the desired result?
> thanks
> Chris
> --------------------------------
> "Murray" wrote:
>
>> Re: Background in my websiteYour CSS can display it once anywhere you 
>> want. You are not restricted to only center align it.
>>
>> -- 
>> Murray
>>
>>   "Jens Peter Karlsen[FP MVP]" <jpkarlsen@mvps.org> wrote in message 
>> news:esXgwKruEHA.1860@TK2MSFTNGP15.phx.gbl...
>>   Not possible. However, you can use CSS to only display it once and in 
>> the center.
>>
>>   Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
>>
>>   > -----Original Message----- 
>>   > From: novato [mailto:fredypublic@hotmail.com]
>>   > Posted At: 25. oktober 2004 14:46
>>   > Posted To: microsoft.public.frontpage.programming
>>   > Conversation: Background in my website
>>   > Subject: Background in my website
>>   >
>>   >
>>   > I new with this things....
>>   > I'm working in a website wich I'd like to put a graphic as a
>>   > background, the graphic has a square area on top and left
>>   > side also with a diffrent color than the rest the problem is
>>   > that frontpage put the graphic in mosaic and I just want the
>>   > graphic once but ajusted to the screen. In other words, like
>>   > the background is displayed on the desktop where you choice
>>   > whether you want it Tile, Center or stretch... so I want it stretch.
>>   >
>>   > Thank you for you help
>>   >
>>   > Novato
>>   >
>>   >
>> 


Relevant Pages

  • Re: Can you have a hover effect on a TD in IE?
    ... >> in CSS which make any kind of sense, ... the fact is that they aren't implemented to specification by browsers. ... display, and know exactly what the size of the text would be, with no ... might be useful for a collective viewing ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Want box around an image with flowing text
    ... >>>I've seen a page using display, and especially display table that did ... display:table* stuff (aka CSS tables) is not supported by IE as you ... >have the desired result of keeping everything in its boxes. ... A method using absolute positioning is probably the best way to do the ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Div not collapsing in IE
    ... will save on the CSS by using a wrapper like #picSeries and specifying ... the style for the inner div blocks like ... And you save on having to specify display, ... lovely for editing CSS. ...
    (alt.html)
  • Re: Positioning a long line by a short spanned section
    ... this method will be used to display a long list of ... Please note that my CSS skills are very basic. ... rightmost edge from the point of view of right text-align ... but support for inline containing ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: How to add a text into a table as e.g.

    ... The underline character in identifiers has been added in CSS 2.1. ... `pt' is a unit suited for printouts, not for display devices. ... This requires a color depth of at least 65536 to be properly displayed ... greater font sizes. ...
    (comp.lang.javascript)