Auto fit to screen

Everything to do with Joomla! 1.5 templates and templating.
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
DisturbedGoW
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Tue Dec 27, 2011 12:59 pm

Auto fit to screen

Postby DisturbedGoW » Tue Dec 27, 2011 1:14 pm

Hello everyone,

this is the first time I am encountering my self with this problem, I have created a Template with photoshop and everithing works fine so far, the only problem I am coming across is the fact that I can´t manage to get the page to auto center it´s self to the screen. I have tried giving the objects % values but that moves them from they´re place, even tho I give them an absolute or fixed value.

Thomasrick.de/clinica is the page I am talking about, has anybody got any ideas? I am not looking to get the objects to auto size them selfs, that would be too much hastle, all I need is for it to adjust to the center on every screen resolution!

If anybody has an idea or needs to source code, I will gladly forward it!

Greetings,
Dist

DisturbedGoW
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Tue Dec 27, 2011 12:59 pm

Re: Auto fit to screen

Postby DisturbedGoW » Thu Dec 29, 2011 9:56 am

Code: Select all

body {
  margin: auto;
  font-family: Geneva, Arial, Helvetica, sans-serif;
  text-align: left;
  font-size: medium;
}

/* This is a wrapper for the _center2 layer you made */
#Layer-1-wrapper {
  position: absolute;
  width: 100%;
  height: 100%
  margin: auto;
}

/* You named this layer _center2 */
#Layer-1 {
  position: absolute;
  left: +0px;
  top: +0px;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* You named this layer bg */
#Layer-2 {
  position: fixed;
  left: 0px;
  top: 0px;
  width: 100%
  height: 100%;
  z-index: 2;
  margin-left: auto;
  margin-right: auto;
}

/* You named this layer logo_gif */
#Layer-3 {
  position: absolute;
  left: 351px;
  top: 0px;
  width: 544px;
  height: 101px;
  z-index: 3;
}

/* You named this layer bgshape_gif */
#Layer-4 {
  position: absolute;
  left: 144px;
  top: 89px;
  width: 991px;
  height: 818px;
  z-index: 4;
  margin-left: auto;
  margin-right: auto;
}

/* You named this layer Shape 1 */
#Layer-5 {
  position: absolute;
  left: 201px;
  top: 18px;
  width: 4px;
  height: 778px;
  z-index: 5;
}

/* You named this layer User2_joomla */
#Layer-6 {
  position: absolute;
  left: 1002px;
  top: 1px;
  width: 226px;
  height: 27px;
  z-index: 6;
}

/* You named this layer content_joomla */
#Layer-7 {
  position: absolute;
  left: 204px;
  top: 304px;
  width: 574px;
  height: 473px;
  z-index: 7;
  overflow: auto;
}

/* You named this layer User1_joomla */
#Layer-8 {
  position: absolute;
  left: 202px;
  top: 19px;
  width: 574px;
  height: 287px;
  z-index: 8;
}
#wraper{
  margin-left: auto;
  margin-right: auto;
}

/* You named this layer left_joomla */
#Layer-9 {
  position: absolute;
  left: 20px;
  top: 26px;
  width: 183px;
  height: 280px;
  z-index: 9;
}


I have tried adding the #Wrapper, and adding it to the body tags, so far still no slution... All I need is for it to center in the middle of every web!

DisturbedGoW
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Tue Dec 27, 2011 12:59 pm

Re: Auto fit to screen

Postby DisturbedGoW » Thu Dec 29, 2011 12:59 pm

Nobody?

inmate1807
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sun Oct 09, 2011 7:07 pm
Location: Macedonia
Contact:

Re: Auto fit to screen

Postby inmate1807 » Mon Jan 02, 2012 2:28 am

It looks ok...

Try - position: centered;

User avatar
RussW
Joomla! Exemplar
Joomla! Exemplar
Posts: 9350
Joined: Sun Oct 22, 2006 4:42 am
Location: Sunshine Coast, Queensland, Australia
Contact:

Re: Auto fit to screen

Postby RussW » Mon Jan 02, 2012 2:38 am

try setting two values in your margin..

Code: Select all

margin: 0px auto;
to centre it horiz and have no margin top and bottom
or

Code: Select all

margin: auto auto;
to make it center vert & horiz
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
Network SMARTS, Systems Engineering http://www.networksmarts.com.au/

DisturbedGoW
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Tue Dec 27, 2011 12:59 pm

Re: Auto fit to screen

Postby DisturbedGoW » Mon Jan 02, 2012 1:31 pm

Both sound plausible, but don´t work for me, I might be adding it to the wrong item tho, where should I paste that code?

DisturbedGoW
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Tue Dec 27, 2011 12:59 pm

Re: Auto fit to screen

Postby DisturbedGoW » Wed Jan 11, 2012 12:31 pm

Almost two weeks and nobody has come up with a solution?

That is a shame... :(

jack76
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Oct 12, 2010 1:38 pm

Re: Auto fit to screen

Postby jack76 » Wed Jan 11, 2012 2:06 pm

This should Work. You can't do a margin auto for a div with position absolute and width 100% because there is no more space.

Code: Select all

/* This is a wrapper for the _center2 layer you made */
#Layer-1-wrapper {
  position: relative;
  width: WIDTH IN PX; /* Set this to the width of your background image and you should be fine */
  height: 100%
  margin: 0 auto;
}


Return to “Templates for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 9 guests