Forums

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

Home Forums CSS Centering content in a fixed background image so it all loads centered.

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #165981
    jmarc4312
    Participant

    Working on ab ebay site template that uses inline css and I think I found one I like. I have been tweaking it and its really coming along nicely but I came into a glitch.

    I decided I did not want the gray background image to take over the entire screen and thus allow for some white space. Once I turned the width of the background image to less than 100% the content started acting haywire. Positioning itself to the left without regard to the fact its background was reduced.

    Essentially I want both the main content and the reduced background image to be centered on the page but not necessarily the text attributes I would like them unchanged.

    Here is the link to the site I am working on: http://www.ebay.com/itm/390788760046?ssPageName=STRK:MESELX:IT&_trksid=p3984.m1555.l2649

    MOD EDIT: Code dump removed.

    #165983
    Paulie_D
    Member

    Please don’t just dump a shipload of code on use.

    Try and create a demo in Codepen so we can get a better handle on it.

    #165984
    jmarc4312
    Participant

    Paulie I am new to this forum, your tone is quite hostile.

    There is a great way to reduce content from your view, you can minimize window, or walk away from screen if it causes you to much distress.

    #165992
    Paulie_D
    Member

    Sorry you feel that way but a code dump really isn’t very helpful in diagnosing your issue.

    See that grey box over on the right headed “Tips”…that should help you out.

    Also this: https://css-tricks.com/how-to-ask-a-good-question-in-the-forums/

    #166262
    Chris Coyier
    Keymaster

    @jmarc4312 which background image are you trying to make smaller?

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