The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Some CSS Help please?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #33455

    I’m currently updating my website and my knowledge of css html scripting is probably below average so though i’d ask the wizards at css-tricks!

    so what i’m trying to achieve is a page with in image as the background, this image can be either a bg element or within a div, preferably a div.
    ontop of this, there will be some text, most likely layered with a light png.
    alot of this is going to be photography so images in excess of 4000×3000 px.
    here is a quick photoshop effort of what it should look like (the only thing i’m skilled at!)

    the image should change randomly, i have the script for this which i will post for reference..

    and the html is..

    That following code is perfect and works fine rendering a random image but i need to merge that with code that allows me to have whatever image has been rendered to fit the size of the window be it fullscreen/@ 1280×1024, 1024×768 etc. or windowed 70% @ 1280×1024, 1024×768 etc.

    Hope i get some replys soon and thanks alot in advance!
    – YauMannn


    umm yeah, there is a really simple solution to this. For some reason my mind wasn’t working to set up a background image within the div, but the solution either as a background image for the div or as an image within the div should work. Simply use percentages, in other words you want it to fill up the entire window no matter what and so instead of specifying a width and height in pixels all you have to do is set both to 100% and that should do it for you. since I was having problems with my div I simply set it on an image with the img tag and it worked. it did leave me a little padding though even though I had used a reset in my css file but it is quite minimal. I’ll keep trying and see if I figure out what I’m not ‘seeing’.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.