Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

set overall width of site


swisslyons

Recommended Posts

I want a fixed width layout instead of the default 100%. What is the easiest way to accomplish this? I see that the 100% table width is set in multiple core files, is there anyway to set it once so i dont have to code in 50 different files?

 

Thanks for any help!

Link to comment
Share on other sites

hello there :)

 

If u dont want to install a contribution, the best way is to change the "100%" to "770", for exemple. And yess, u have to do it in a few files; I did it and it took me about 5 minutes, not longer.

 

If u need the name of the files u need to change, just let me know

 

Hope it helped :)

 

Laura

Link to comment
Share on other sites

Laura ,

could you please tell me the names of the files..it would be a big help, i have already changed more than 10, and it looks like there are lots more.

 

Too bad there isnt a 'siteWidth variable that you could set just once for global

 

thanks

Link to comment
Share on other sites

Use the power of CSS, and change only one file:

 

Open stylesheet.css, and find where the BODY attributes are set (usually near the top). Add the line margin: 0px 5% 0px 5%; somewhere between the curly braces.

 

The order of values is top, right, bottom, left, so the above gives you 5% margins on either side of the page, and no space at the top or bottom.

 

You can use pixels or percentages. It's not as precise as hard-coding all those widths, but it's a lot faster.

Link to comment
Share on other sites

logiczero Posted: Dec 19 2003, 05:06 AM

It's not as precise as hard-coding all those widths, but it's a lot faster.

And it fits ALL resolutions, and it's easier to change, and it's easier to maintain, and with CSS you can do much more nice things, and :D :D :D

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

  • 1 year later...

I've tried the contribs and the css and nothing seems to change the width of the center. I've got to have something that's overriding these changes but don't know where to look. Any suggestions?

 

P.S. if anyone is willing to have a [careful] look I will give you access.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...