May 2, 20179 yr Hi Could somebody please help me with some coding...? I am new to this forum and I am also fairly new to web design, however I need to create a site and I cannot figure out how to code a specific layout, using html and css. This is the situation: (I am using Dreamveawer CC) I have a background image that needs to fill the whole screen. For this I have used a code: html { background: url(images/bgimg.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;} and that seems to be working, as I need the image to shrink down with the screen size - as the site needs to be responsive and fit for tablet and mobile view etc. The problem I have are actually the images, because they need to be scattered all over the screen, they also need to be responsive to the screen size and shrink along with the background image for tablet view. (For the mobile view, the images turn into icon size and are aligned in rows). I don't know how to position images exactly where I want them, and have them move and shrink with the size of the screen all the way to tablet size? I have created a container, using: <div class="Container"></div> .Container { height: 800px; width: 100%; margin: 10px auto; background: #5780E8;} I don't know if this is a correct size either. But it seems to be working with the screen size. I thought I'd place the images inside of this container. Could someone please explain this to me? Thank you...
May 2, 20179 yr css positioning is not simple, but why not have go? You should find a good reference manual of css declarations and refer to it. Your background declaration for instance is wrong so while it may work it may cause you unpredictable trouble I think (without testing so I could be wrong) You will want to make your images display: block; position: absolute; top: xx%; left: xx%; You will need to understand media queries to change the display for mobile. Change the size of images by setting height and width in % or by media queries. Making the images display: inline or inline-block will allow you to line them up easily. changing from image to icon you would do with switching from background to content or using sprites or something At least that it how I would start to tackle it.
Create an account or sign in to comment