WordPress.org

Ready to get started?Download WordPress

Forums

Central Column...How? (2 posts)

  1. Alex Cragg
    Member
    Posted 7 years ago #

    ive been using wordpress for a year, and i'm coming to the point where i want to design my own themes. but ive come across a problem...i dont know how to create a central column (!!) with space at the sides, as opposed to a header etc that fills the whole width. If i change the width of everything, it just all pushes to the left hand side. what css tag do i need to use? I know this is probably really simple, but i can't work it out from other central columned themes. thanks (my return button is broke, hence the big block of text:)

  2. peiqinglong
    Member
    Posted 7 years ago #

    What you do is you have your central column right:

    <div id="central_column"></div>

    Inside of it, you're banner:

    <div id="central_column">
      <div id="banner"><img src="http://" alt="" /></div>'
    
    Then in your CSS:

    #central_column {width: 800px; }
    #banner {margin: 0 auto; width: 600px (however big your banner is); }`

    What's that going to do is put the img in your banner centered in your central column. This is a crude example, but will give you an idea. The margin: 0 auto is what auto centers the img.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags