Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

background-position not working  RSS feed

 
raman kadam
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Could you please suggest why the background-position : right bottom doesn't work correctly below.

It produces attached output. The code works for position as right top/ left top.

Please suggest.

background-position.png
[Thumbnail for background-position.png]
background-position right bottom
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66038
140
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What makes you say it's not working? Looks right to me.
 
raman kadam
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Bear,

Thanks so much for your reply.
If I change the position to top right it gives the attached image.
So I was expecting that the position top bottom would just display the image at the bottom corner. Is that wrong ?
background-position2.png
[Thumbnail for background-position2.png]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66038
140
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first image you posted clearly shows that the image is being positioned at the bottom right of the body. Note that the body has a height of zero.
 
raman kadam
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If that's the case, then how to display it at the bottom right corner?
 
raman kadam
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,

Just changed the height of body to 800px and it appeared correctly at the bottom right corner.

But changing the height size displays scroll-bar, so how to make the image appear at the right corner but without displaying any scroll-bar ?
background-position3.png
[Thumbnail for background-position3.png]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66038
140
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The scroll bar will appear whenever the body size is larger then the window it is being shown in.

You may want to look into the overflow CSS rule to help control how overlap is displayed.
 
raman kadam
Greenhorn
Posts: 15
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!