How to set the margins to auto for divs?


(Becca) #1

Hi

I am trying to centralise the divs on these two pages:

Landscape
Portrait

I’m using:
ThemeFlood’s: BlankTheme 2.1 - with a fixed page width
Joe Workman’s: HTML Enclosure
Stacks4Stacks: HoverBox

Using the HTML enclosure, I’ve been able to wrap a div around the Hoverbox to add next/previous/close buttons to the images (still in a test folder so URLs aren’t live). If I assign the CSS:

to the div’s class (which was set for the CSS border), all it does is move the CSS border, not all the other contents.

I’ve tried wrapping another div around the whole lot with a new ID, but assigning the above CSS simply moved the border again, leaving the image/nav buttons behind.

I’m sure I’m probably missing something obvious, so thank you so much for any help!!


(Marten Claridge ) #2

Hi Becca,

Certainly with the Portraits, you might want to look at adding the following to the .portbord class:

margin: 0 auto;
display: block;
position: relative;

… and maybe even removing the 67px border-width. See if that brings you a little closer to the solution…

Cheers,

Marten


(Becca) #3

Hi Marten

Perfect, thank you - I applied the CSS to the #folio id so the whole lot moves!