The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Background Image Help
If this question has been asked before then I apologize. I have searched Google and this website and found nothing that answers it so far.
I have a background image for my website that is 1680px by 1050px. I want this background image to be a fixed image and I want it to automatically re-size depending on the users screen resolution. Is this possible? If so, what do I need to do to make this happen? If someone needs an example of what I mean, use this as an example. If someone has their screen resolution set to 800x600 then I want them to see the background image as a 800x600 fixed background image. If they change their resolution to 1280x960 then I want them to see the background image as a 1280x960 fixed background image. If they then change their resolution to 1680x1050 I want them to see the background image as a 1680x1050 fixed background image. Screen Resolution = 800x600 Image Size becomes 800x600 Screen Resolution = 1280x960 Image Size becomes 1280x960 Screen Resolution = 1680x1050 Image Size becomes 1680x1050 |
#2
|
||||
|
||||
You'll have to use some CSS - http://css.flepstudio.org/en/css-tip...und-image.html
|
#3
|
|||
|
|||
What CSS file am I supposed to be editing? I edited vbulletin.css and changed it from the default:
Code:
background:{vb:stylevar doc_background}; Code:
background:{vb:stylevar doc_background}; {position:absolute}; {height:100%}; {width: 100%}; {margin:0}; {padding: 0}; |
#4
|
||||
|
||||
Quote:
|
#5
|
|||
|
|||
So I removed linking to stylevar doc_background completely. This is what I now have:
Code:
background:url(http://www.undergroundgamers.net/forums/images/misc/ugbg.jpg); position:absolute; height:100%; width:100%; margin:0; padding:0; --------------- Added [DATE]1293188964[/DATE] at [TIME]1293188964[/TIME] --------------- Here's an update. I've ended up with this code: Code:
html { height:100% width:100% margin:0; padding:0; background:url(http://www.undergroundgamers.net/forums/images/misc/ugbg.jpg) center center no-repeat; <vb:if condition="is_browser('opera') && $stylevar['textdirection'] == 'rtl'"> overflow-x: hidden; </vb:if> } |
#6
|
||||
|
||||
You forgot the ; after the height and width properties in your CSS and you would probably want to use "center top", not "center center", but besides that, I think what you need to do is edit the templates and add that background as an image, like in the tutorial I linked you to. See their page here - http://www.onsitus.it/css-tutorials/sfondo-100-percent/ Isn't that what you want? Look at the page source - the background is an image tag added to the page.
|
#7
|
|||
|
|||
A very old old thread but i have the same problem , can`t know what i should and i try to do what u saied but nothing happened > anyone can help?
|
#8
|
|||
|
|||
its better to open a new thread ^_^
|
#9
|
||||
|
||||
And we'll need a link to the style you have tried to implement the code in that tutorial.
|
#10
|
|||
|
|||
I send it in private msg!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|