PDA

View Full Version : Specify Width


steveinid
07-07-2005, 11:45 PM
First off... Great Directory. I like it.

How do I set the width of the overall directory to a fixed width instead of the width="100%' that it is currently set at. I could go in and find all instances but don't want to screw it up and reinstall it.

Thanks
Steve

David
07-08-2005, 04:52 AM
You probably want to look in header.tpl or main.tpl
It should be safe to "screw around" a little. :)

Ap0s7le
07-08-2005, 07:04 AM
Hello Steve,

Take a look in the main.css and at the top of the file you'll see
Content visible to registered users only.

Simply add a width attribute like so.
Content visible to registered users only.

Does this help you?

steveinid
07-08-2005, 03:57 PM
That worked perfectly... Now, I have just one more question. How do I get it to center on the page? I know basic HTML but not too good with css.

Any help would be fantastic. :D

springdot
07-08-2005, 04:55 PM
Probably the easiest thing to do is enclose what you want to be centered in

<div align="center"> </div>

tags

This *should* centre what you need to be centred.

Have you modified your header files at all to enclose the directory in a table, or have you just used the suggestion below to reduce the width?

Ap0s7le
07-08-2005, 05:51 PM
Actually your best bet with this is super simple.

below your newly added width, add the margins like so.

Content visible to registered users only.

You can see the end result here
http://www.apostlestudios.com/phplinkdirectory/
(Feel free to add your PLD link and site to that list.)

It's best to keep styling out of the HTML.

Let me know if this helped.

later

steveinid
07-08-2005, 06:45 PM
Springdot... I tried those but was unsure where exactly to put the center tags. I couldn't figure it out.

I also tried "align: center;" (without the quotes) but that didn't work either.

However, Ap0s7le, your idea worked beautifully. You can see the results here: http://www.lambshead.com

I have a bit more work to do which will require more help from the board, but I will work on it a bit at a time.

David
07-08-2005, 06:59 PM
What is Ap0s7le is great. Here would be the finished code.

Content visible to registered users only.

Ap0s7le
07-08-2005, 07:12 PM
That's great Steve, glad it worked for you.

I prefer percentages (%) when I do this, but since you wanted a specific width the pixel based would be best in your situation.

later

springdot
07-09-2005, 09:41 AM
steveinid - That's cool, I would go with Ap0s7le's answer anyway.

Mine is only really valid if you have enclosed the directory itself in a table (which I have), but many people don't I guess!

It's all down to personal taste

LennyP
03-08-2007, 12:18 PM
I added what was recommended here for my directory but there was no change. Can someone help me with my directory located in my signature?

RayDube
03-19-2007, 05:07 PM
Content visible to registered users only.


Hi Lenny,

It appears that your signature file isn't attached! :)

If you'd attach it, we could take a look.

LennyP
03-19-2007, 09:09 PM
I added my directory to my signature. I was actually able to get the body and the footer individually to work but I still don't know how to get the header and navigation bar to change. I would like to know how I can either make the whole thing change or to make those parts changed. I have of course removed the changes since then because it looked funny.

RayDube
03-19-2007, 09:18 PM
Hi again Lenny,

Because you've de-activated the changes, I'm not sure what you were trying to do. In order to change the width in the topmenus, you need to find the correct css code to modify.

You may need to look at either class=submit, or id=path...

LennyP
03-19-2007, 10:11 PM
Thank you I got it changed.