Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-06-2013, 05:48 PM   PM User | #1
Pascal90
New to the CF scene

 
Join Date: Mar 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Pascal90 is an unknown quantity at this point
Webseite moving to the side

Hello,

I am working on a Joomla website and I noticed that on some occasions my hole side is moving slightly to the side.
What I mean is the middle part just moves a couple of px to the side when I switch on some sub pages

As example if go on http://awbg.gieseke-lemfoerde.de/ind...-unser-service

and than press in the right Menu the Home Button you will see what I mean.

I hope someone can please tell me how to fix this.
Thx for your help in advanced

This is my template css code
Code:
.componentheading {
  
  font-size:20px;
  }
  

.contentheading {

  font-size:20px;
  color:#77aa35;
  padding-right: 15px;
  text-shadow:#333 4px 4px 4px;
  margin-right:15px;
}

.contentheading a {

}

body {
  font: 80%/1.4 Verdana, Arial, Helvetica, sans-serif;
  background-color:  #F0FFFF;
  margin: 0;
  padding: 0;
  color: #000;
}

/* ~~ Element/tag selectors ~~ */
ul, ol, dl { 
  padding: 0;
  margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
  margin-top: 0;
  padding-right: 15px;
  padding-left: 15px;
  font-family: Verdana, Arial, Helvetica, sans-serif;
}
a img { 
  border: none;
}


a:link {
  color: #909090;
  text-decoration: underline; 
}
a:visited {
  color: #6E6C64;
  text-decoration: underline;
}
a:hover, a:active, a:focus { 
  text-decoration: none;
}


/* ~~this fixed width container surrounds the other divs~~ */
.container {
  width: 960px;
  background-color: #FFF;
  margin: 0 auto; 
}

.logo {
  width: 215px;
  height: 137px;
  float: left;
}

.headerTop {
  width: 745px;
  height: 50px;
  float: right;
}

.headerBottem {
  width: 745px;
  height: 30px;
  float: right;
}

.sidebar1 {
  width: 215px;
  padding-bottom: 10px;
  float: left;
}
.content {
  padding: 10px 0;
  width: 745px;
  float: right;
}

.textlauf {
  padding: 0px 0;
  width: 745px;
  float: right;
} p.adr { color:#ffffff; }



/* ~~ This grouped selector gives the lists in the .content area space ~~ */
.content ul, .content ol { 
  padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
}

/* ~~ The navigation list styles (can be removed if you choose to use a premade flyout menu like Spry) ~~ */
ul.nav {
  list-style: none; /* this removes the list marker */
  border-top: 1px solid #666; /* this creates the top border for the links - all others are placed using a bottom border on the LI */
  margin-bottom: 15px; /* this creates the space between the navigation on the content below */
}
ul.nav li {
  border-bottom: 1px solid #666; /* this creates the button separation */
}
ul.nav a, ul.nav a:visited { /* grouping these selectors makes sure that your links retain their button look even after being visited */
  padding: 5px 5px 5px 15px;
  display: block; /* this gives the link block properties causing it to fill the whole LI containing it. This causes the entire area to react to a mouse click. */
  width: 160px;  /*this width makes the entire button clickable for IE6. If you don't need to support IE6, it can be removed. Calculate the proper width by subtracting the padding on this link from the width of your sidebar container. */
  text-decoration: none;
  background-color: #C6D580;
}
ul.nav a:hover, ul.nav a:active, ul.nav a:focus { /* this changes the background and text color for both mouse and keyboard navigators */
  background-color: #ADB96E;
  color: #FFF;
}

/* ~~ The footer ~~ */
.footertop{
  padding: 2px 0;
  position: relative;
  clear: both;
  height: 0px;
  background-color:  #c1c1c1;
}

.footer{
  padding: 10px 0;
  position: relative;
  clear: both;
  background-color:  #FFFFFF;
}

.footerright {
  position: relative;
  width: 745px;
  height: 80px;
  float: right;
  background-color:  #FFFFFF;
}

.footerleft {
  padding-top: 5px;    width: 215px;
  height: 80px;
  float: left;
  position: relative;
  font-size:80%;
  background-color:  #282E7D;  
}

/* ~~ miscellaneous float/clear classes ~~ */
.fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
  float: right;
  margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
  float: left;
  margin-right: 8px;
}
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
  clear:both;
  height:0;
  font-size: 1px;
  line-height: 0px;
}

This is the html/php from my template

Code:
<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jdoc:include type="head"/>
<link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template.css" type="text/css"/>
<link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/navigation.css" type="text/css"/>
<link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/components.css" type="text/css"/>
</head>

<body>
<div class="container">

  <div class="logo">
  <img src="/images/AWBG_small.png" width="215" height="137" alt="Logo" /></div>
  <div class="headerTop">
       <jdoc:include type="modules" name="headerTop" style="xhtml"/>
  </div>
  <div class="headerBottem">
         <jdoc:include type="modules" name="headerBottem" style="xhtml"/>
  </div>
  
   <div class="textlauf">
      <jdoc:include type="modules" name="textlauf" style="xhtml"/></div>
<div class="content">
  <jdoc:include type="message"/>
  <jdoc:include type="component"/>
  </div>
    
  <div class="sidebar1">
    <jdoc:include type="modules" name="navigation" style="xhtml" />
  <img src="/images/sidebarende.png" alt="sidebarend"/>
  </div>
  
 <div class="footer">
  <div class="footertop"></div>
   <div class="footerright">
  <jdoc:include type="modules" name="footer" style="xhtml"/>
   </div>
    <div class="footerleft">
  <p class="adr"><a href="https://maps.google.com/maps?q=Gut-Steinbrink-Stra%C3%9Fe+8,+Stemwede,+Germany&hl=en&ie=UTF8&ll=52.405175,8.397557&spn=0.005092,0.005751&sll=52.4167,8.43333&sspn=0.325823,0.368042&t=h&hnear=Gut-Steinbrink-Stra%C3%9Fe+8,+Arrenkamp+32351+Stemwede,+Detmold,+Nordrhein-Westfalen,+Germany&z=17&iwloc=r0" target="_blank">Ihr Weg zu uns!</a><br/>	Mo-Fr. 8:00 - 17:00 Uhr<br/>
    Tel: 05474-2056-0<br />	Fax: 05474-2056-20<br/>
    Email: <a href="mailto:info@awbg.de">info@awbg.de</a></p>
       <br/>
    </div>
 </div>

</div>
</body>

</html>
Pascal90 is offline   Reply With Quote
Old 03-06-2013, 06:58 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,600
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
It’s the scrollbar, baby!
And by the way: I’m not getting this shift because my laptop screen is probably not as tall as your monitor, so the site is not ending before the viewport ends. This is a totally natural behavior and nobody will care, I promise.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 03-06-2013, 07:04 PM   PM User | #3
Pascal90
New to the CF scene

 
Join Date: Mar 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Pascal90 is an unknown quantity at this point
AH thx, I never would have thought off that
Pascal90 is offline   Reply With Quote
Old 03-06-2013, 07:29 PM   PM User | #4
teedoff
Senior Coder

 
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
teedoff is on a distinguished road
Personally, it always bothers me..lol

If it bothers you enough, you can add:

html{
overflow-y: scroll;
}

to your style sheet to force a scroll bar on every page whether it needs one or not.
__________________
Teed
teedoff is offline   Reply With Quote
Old 03-06-2013, 07:56 PM   PM User | #5
Pascal90
New to the CF scene

 
Join Date: Mar 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Pascal90 is an unknown quantity at this point
Where exactly do I have to place this line?

html{
overflow-y: scroll;
}

My css template looks now like this:
I marked it in red where I put it. I also tried it putting it on the first position in the css.
But the scrollbar is not displaying

Code:
.componentheading {
  
  font-size:20px;
  }
  

.contentheading {

  font-size:20px;
  color:#77aa35;
  padding-right: 15px;
  text-shadow:#333 4px 4px 4px;
  margin-right:15px;
}

.contentheading a {

}

html {
overflow-y: scroll;}

body {
  font: 80%/1.4 Verdana, Arial, Helvetica, sans-serif;
  background-color:  #F0FFFF;
  margin: 0;
  padding: 0;
  color: #000;
}

/* ~~ Element/tag selectors ~~ */
ul, ol, dl { 
  padding: 0;
  margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
  margin-top: 0;
  padding-right: 15px;
  padding-left: 15px;
  font-family: Verdana, Arial, Helvetica, sans-serif;
}
a img { 
  border: none;
}


a:link {
  color: #909090;
  text-decoration: underline; 
}
a:visited {
  color: #6E6C64;
  text-decoration: underline;
}
a:hover, a:active, a:focus { 
  text-decoration: none;
}

.container {
  width: 960px;
  background-color: #FFF;
  margin: 0 auto; 
}

.logo {
  width: 215px;
  height: 137px;
  float: left;
}

.headerTop {
  width: 745px;
  height: 50px;
  float: right;
}

.headerBottem {
  width: 745px;
  height: 30px;
  float: right;
}

.sidebar1 {
  width: 215px;
  padding-bottom: 10px;
  float: left;
}
.content {
  padding: 10px 0;
  width: 745px;
  float: right;
}

.textlauf {
  padding: 0px 0;
  width: 745px;
  float: right;
} p.adr { color:#ffffff; }



.content ul, .content ol { 
  padding: 0 15px 15px 40px; 
}


ul.nav {
  list-style: none; 
  border-top: 1px solid #666; 
  margin-bottom: 15px; 
}
ul.nav li {
  border-bottom: 1px solid #666; 
}
ul.nav a, ul.nav a:visited { 
  padding: 5px 5px 5px 15px;
  display: block;
  width: 160px; 
  text-decoration: none;
  background-color: #C6D580;
}
ul.nav a:hover, ul.nav a:active, ul.nav a:focus { 
  background-color: #ADB96E;
  color: #FFF;
}

/* ~~ The footer ~~ */
.footertop{
  padding: 2px 0;
  position: relative;
  clear: both;
  height: 0px;
  background-color:  #c1c1c1;
}

.footer{
  padding: 10px 0;
  position: relative;
  clear: both;
  background-color:  #FFFFFF;
}

.footerright {
  padding-top: 5px; 
  position: relative;
  width: 745px;
  height: 80px;
  float: right;
  background-color:  #ffffff;
}

.footerleft {
  padding-top: 5px;    width: 215px;
  height: 80px;
  float: left;
  position: relative;
  font-size:80%;
  background-color:  #282E7D;  
}


.fltrt {  
  float: right;
  margin-left: 8px;
}
.fltlft { 
  float: left;
  margin-right: 8px;
}
.clearfloat { 
  clear:both;
  height:0;
  font-size: 1px;
  line-height: 0px;
}
EDIT: sry for the double post, I dont know why but this post was just gone.
I even checked with 2 different browsers oO

Last edited by Pascal90; 03-07-2013 at 12:52 AM..
Pascal90 is offline   Reply With Quote
Old 03-07-2013, 12:13 AM   PM User | #6
Pascal90
New to the CF scene

 
Join Date: Mar 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Pascal90 is an unknown quantity at this point
Ah thx, its kinda working.

But joomla is somehow overwriting it with an inline style

If I deselect the inline style it is working.
Is there someway to force the template.css over the inline style
(I could not figure out where the inline is coming from)

I already tryed !important, but that works only in IE

Pascal90 is offline   Reply With Quote
Old 03-07-2013, 12:57 AM   PM User | #7
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
You might try putting the overflow:scroll on the body tag instead of the html tag. Maybe joomla doesn't force that one inline?

Dave
tracknut is offline   Reply With Quote
Old 03-07-2013, 01:05 AM   PM User | #8
Pascal90
New to the CF scene

 
Join Date: Mar 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Pascal90 is an unknown quantity at this point
its also not working in the body

stupid inline
Pascal90 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:04 AM.


Advertisement
Log in to turn off these ads.