The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Auto fit to screen
PostPosted: Tue Dec 27, 2011 1:14 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Dec 27, 2011 12:59 pm
Posts: 50
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


Top
 Profile  
 
 Post subject: Re: Auto fit to screen
PostPosted: Thu Dec 29, 2011 9:56 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Dec 27, 2011 12:59 pm
Posts: 50
Code:
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!


Top
 Profile  
 
 Post subject: Re: Auto fit to screen
PostPosted: Thu Dec 29, 2011 12:59 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Dec 27, 2011 12:59 pm
Posts: 50
Nobody?


Top
 Profile  
 
 Post subject: Re: Auto fit to screen
PostPosted: Mon Jan 02, 2012 2:28 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Oct 09, 2011 7:07 pm
Posts: 27
Location: Macedonia
It looks ok...

Try - position: centered;

_________________
http://www.forumest.com/


Top
 Profile  
 
 Post subject: Re: Auto fit to screen
PostPosted: Mon Jan 02, 2012 2:38 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sun Oct 22, 2006 4:42 am
Posts: 9352
Location: Sunshine Coast, Queensland, Australia
try setting two values in your margin..

Code:
margin: 0px auto;
to centre it horiz and have no margin top and bottom
or
Code:
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/


Top
 Profile  
 
 Post subject: Re: Auto fit to screen
PostPosted: Mon Jan 02, 2012 1:31 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Dec 27, 2011 12:59 pm
Posts: 50
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?


Top
 Profile  
 
 Post subject: Re: Auto fit to screen
PostPosted: Wed Jan 11, 2012 12:31 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Dec 27, 2011 12:59 pm
Posts: 50
Almost two weeks and nobody has come up with a solution?

That is a shame... :(


Top
 Profile  
 
 Post subject: Re: Auto fit to screen
PostPosted: Wed Jan 11, 2012 2:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 12, 2010 1:38 pm
Posts: 19
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:
/* 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;
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 



Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group