Jump to content

DIV Support - Center content


Drainy

Recommended Posts

Hi,

 

Ive had a look through the other DIV questions but I think mine might be a bit simpler (I hope so).

Although I like to think im quite good at thinking things out I am loosing my mind on this one.

I have created a page with a DIVs as the basis of the layout,

a container div encapsulating them all with absolutely nothing but the width and text-align:center set.

a central content container (within the first one) which has a right and a left column for navigation.

My issue now falls when I try to position content within the two columns.

First of all the columns are positioned using float, to position the content I figured I could use position:relative? and then set their position against the contentcontainer div.

Obviously this put them all in a line down the middle left of the screen....

I use position:fixed but I dont like this as the rest of my page is adaptable but it seems backwards for me to code the rest in such a fluid way and then fix the positions of the central content because I cant find a way to position them against the contentcontainer.

What I need is to go, 50px in from the left of the div you are in.

 

Thanks for reading all that, I am hoping I am just doing something stupid or missing an easy trick.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.