SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: CSS Margin

Hybrid View

  1. #1
    SitePoint Addict mserms's Avatar
    Join Date
    Jun 2001
    Location
    Scotland
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Margin

    I'm still battling with CSS so this could be an obvious mistake. I've been arsing about but I can't work out why I'm getting a gap on the right in Opera 6. Any clues?

    layout.css:

    Code:
    body {
    		margin: 0px 0px 0px 0px;
    		padding: 0px;
    		text-align: justify;
    		background-color: #abc;
    		}
    	
    	div.main {
    		border: 2px solid #006; 
    		margin: 0px 5px 0px 5px;
    		background-color: #fff;
    		}
    	
    	div.maintop {
    		margin: 15px 5px 0px 5px;
    		background-color: #006;
    		border-right: 2px solid #006;
    		border-left: 2px solid #006;
    		border-top: 2px solid #006;
    		}
    		
    	#banner {
    		background-color:#FF9900;
    		margin:0px 0px 0px 0px;
    		height: 100px;
    		padding: 0px;
    		border-bottom: 1px solid #000;
    		voice-family: "\"}\"";
    		voice-family: inherit;
    		height:39px;
    		}
    		
    	#footer {
    		background-color:#FF9900;
    		height:20px;
    		width:100%;
    		margin-top:5px;
    		border-bottom:1px solid #000;
    		border-top:1px solid #000;
    		voice-family: "\"}\"";
    		voice-family: inherit;
    		height:39px;
    		}
    
    	div.main #menu {
    		/*border:1px dashed #000;*/ 
    		float:right;
    		width:150px;
    		background:#eee;
    		padding:5px;
    		margin:5px;
    		}
    		
    	p,h1,pre {
    		margin:0px 10px 10px 10px;
    		}
    		
    	h1 {
    		font-size:14px;
    		padding-top:10px;
    		}
    	
    	#menu p { font-size:10px}
    index.htm:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head><link rel="stylesheet" type="text/css" href="layout.css" />
    <title>css test page - XHTML 1.0 Strict</title>
    </head>
    <body>
    <div id="banner">title and logo<br />links</div>
    
    <div class="maintop">title</div>
    <div class="main">
    
    	<h1>This is a header.</h1>
    	<h1>main</h1>
    
    	<p>Some garbage text: The story begins with a trip to Dunoon. The previous week I had managed to persuade Abel, the Spaniard to come with me to a new crag in Dunoon to try to send some new routes. Abel is a boulderer so I cunningly managed to persuaded him to be my belay chum for the day. I promised him bouldering, which there was, but being a soft lad he thought that the Mica Schist was a tad too sharp. We went to the crag and I failed to onsight the route so I spent the best part of the day cleaning it for a future visit. We then top roped an arete and I vowed I would be back the following week. Next Friday I managed to get Mike out climbing, which is quite hard as he is studying the art of playing games on his Mac. Chris the photographer was there, ready to take some decent shots as well. We headed of to my brothers in Dunoon and kipped the night there. I can tell you I couldn't get to sleep all I could think of were the moves on the arete..........SAD. I imagined grabbing the last hold and then sitting proud at the top looking at the brilliant sunny view. I woke up at 6am, psyched, rolled a 'ciggy' then headed out to the porch, "****, ****, AND DOUBLE ****", rain pissing everywhere. So much for the dream of sunshine, dry rock and a prize days climbing. Well it's Dunoon after all, and I am now thinking that I have wasted time, money and ruined the guy's weekend bringing them to this god forsaken hell hole they call Dunoon. I inform the guys and they seem quite glad and tell me that it is only six so we could get a lie in. Lie in my butt - we all get up and decide to head back stopping by Arrochar caves and then Dumbarton and if that fails go to the Glasgow wall..........PUCKER. The Arrochar caves proved interesting. I wanted to see if Dave was trying to steer us away from a good bouldering venue but he was right, it's crap, but a nice place to go and have a laugh. I saw a couple of horses in a field frollicking, chasing each other and looking as if they were about to get busy. As we got closer the two horses were both males. I laughed thinking of the scene in Gladiator, a trader states that he was given a queer giraffe. I thought of the farmer grabbing a traders balls and saying "you sold me a queer horse".
    </p>
    
    </div>
    <div class="maintop">title</div>
    <div class="main">
    <p>this is the second one</p></div>
    <div id="footer">footer and stuff</div>
    </body>
    </html>
    Thanks in advance,

  2. #2
    SitePoint Member XiXora's Avatar
    Join Date
    May 2002
    Location
    Birmingham, UK
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if u turned off scroll bars it may still want the space for the scroll, i think i had that prob b4 forgotten soooo long ago

  3. #3
    SitePoint Addict mserms's Avatar
    Join Date
    Jun 2001
    Location
    Scotland
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh... the space does seem to be for the scrollbar. Why doesn't Opera just fill the page when there is no scrollbar there? Is there anyway to change this or is it just the way Opera works?

  4. #4
    SitePoint Member XiXora's Avatar
    Join Date
    May 2002
    Location
    Birmingham, UK
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cant change this afaik sorry


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •