Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Image Margins

  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Image Margins

    Hi folks, im currently working on a website for a uni project, i think its looking pretty good as my initial design, but ive come accross a problem which i cant seem to find up on CSS tutorial sites or google. Basically im trying to add Image margins to my webpage (www.freewebs.com/carlosamegos/Index2.html)

    currently i have my page to resize for different viewing screens, but ive been trying to find out how to give my page margins like www.gamefaqs.com has (the images are ignored, tho i think the default image they hav is just a small gradient on the side of the main page, they quite often have full images to advertise games down the sides and sometimes accross, going through contents blocks), so i can make my website look complete on a 1024 screen and a 800.

    Ive been messing around with layer properties, giving backgrounds to layers etc, but i cant seem to get it to ignore the image, of course initially i thought it was just a background with some kind of relative centering but i dont hav a clue how theyve done it.

    This is my first time using CSS properly so maybe im completely off topic and what im after is a javascript lol, but any help would be appreciatted thanks

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Okay so if I understand you correctly you don't want content to overlap your background image because it would start to clash?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    im not sure if i follow you there, what i want is the hav an image on each side going down the side of my main webpage, so on a 1024 view it looks complete, but when reduced to 800 the images are ignored by the horizontal bar. So like a background with a centering would work, ive tried to create a layer, and then giving it a background image to expand 100%, relative position and centering, but it hasnt worked. www.gamefaqs.com has the margins that im after, just dont know how theyve done it
    Last edited by Ironite; 12-15-2006 at 08:16 PM.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Set it as the background to the body.
    Code:
    html, body {
    /*background stuff here*/
    }
    Hmm did you remove the doctype from your page? You need to use a doctype in order to ensure a better chance of the page rendering properly in multiple browsers.

    Read this to see how to center a background image

    http://www.w3schools.com/css/css_background.asp
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm doctype? ive not even heard of that... im very new to this whole CSS, first site ive tried to make even using Style Sheets heh, but yeah some of the images not loading is a problem, ill look into the doctypes thing thanks

    thanks for that site, i tried out what it said, applied a top center position to the pages background but its just the same it doesnt follow my contents which is centered, in theory it shud hav, ive flicked thru the site and cant find what im after either.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •