Page 1 of 1

center margin Bulletproof

Posted: Fri Feb 20, 2009 8:31 pm
by ed587
I switched templates to Bulletproof but I can't seem to get the content of my html nuggets to center in my single right margin. Tried doing it the way I did it using the Joshua template: <p align="center"> with no luck. Changed the style.css to auto from 0:
/*** Sidebar styles ***/
.serendipitySideBarItem {
margin: auto;
}

.serendipitySideBarTitle {
margin: auto;
}

.serendipitySideBarContent {
margin: auto;
}
Then simply selected the image and centered in the editor with no luck. I am in the process of narrowing my entries to fit in Bulletproof but on the first page I don't think wide entries are the issue. If you want to see, it is at http://www.neterm.net/serendipity

Thanks,
~Ed587

Re: center margin Bulletproof

Posted: Fri Feb 20, 2009 8:55 pm
by judebert
I notice all the stuff you want centered is in a paragraph. You can change its inline style to:

Code: Select all

<p style="text-align: center;">

Re: center margin Bulletproof

Posted: Fri Feb 20, 2009 9:06 pm
by ed587
The nuggets that are text ARE centering. It is the images that are not. Also, is the width of the margin in bullet proof determined by the width of an image? Maybe my images are too wide?

Re: center margin Bulletproof

Posted: Fri Feb 20, 2009 9:13 pm
by ed587
Okay, I got the images to center by putting them in a centered table. I know there must be a better way to do it with a <div>. I will work on it. Thanks.

Re: center margin Bulletproof

Posted: Fri Feb 20, 2009 9:14 pm
by Don Chambers
If you are placing your image within a <p>aragraph in bulletproof, try this:

Code: Select all

<p class="serendipity_center">
    <img blah blah />
</p>

Re: center margin Bulletproof

Posted: Fri Feb 20, 2009 9:34 pm
by ed587
Don Chambers wrote:If you are placing your image within a <p>aragraph in bulletproof, try this:

Code: Select all

<p class="serendipity_center">
    <img blah blah />
</p>
That's working! :D Thanks!

Re: center margin Bulletproof

Posted: Fri Feb 20, 2009 9:47 pm
by Don Chambers
Great! And so there is no misunderstanding, that is a class in bulletproof - some other templates have it too, doing much the same thing which is text-align: center and margin: 0 auto. If you switched templates, it may, or may not, continue to work as expected unless you revised the nugget or a different template's stylesheet.