School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,578 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,212 people online right now. Registration is fast and FREE... Join Now!




Div Spacing problem

 

Div Spacing problem

tscott

18 Jun, 2009 - 03:43 PM
Post #1

D.I.C Regular
***

Joined: 30 Jan, 2009
Posts: 297



Thanked: 1 times
My Contributions
If I wanted to make the main content section wider how would I go about doing that I've tried to mess with the padding and the margin within the class and had absolutely no luck everytime I mess with it the page blows up.

CODE

<!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>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <meta name="author" content="Jacqueline Zinn" />
    <meta name="keywords" content="Jacqueline Zinn design, interior design, Chicago Interior Design, ds, visual, display" />
    <meta name="description" content="Jacqueline Zinn Design reflects a luxury lifestyle with clean lines, warm layers and timeless designs.." />
    
    <title>Jacqueline Zinn Design</title>
    <style type="text/css" media="all">
       body {
    margin:0;
    background-color:#000;
    color:#FFF
}
#page {
    width:100%;
    position:absolute;
    top:110px;
    border: .2em Solid #333;
}
#container {
    width: 780px;
    margin: 0 auto;
    text-align: left;
}
#left {
    float: left;
    width: 150px;
    padding: 15px 10px 15px 20px;
}
#right {
    float: right;
    width: 150px;
    padding: 15px 10px 15px 20px;
}
#mainContent {
    margin-left: 180px;
    margin-right: 180px;
    padding-left: 10px;
    padding-right: 10px;
    border-left: 1px solid #333;
    border-right: 1px solid #333;

}

h1 {
margin: 0px;
}

p {
margin: 0px;
}




</style>

</head>

<body>
<div id="page">

<div id="container">

  <div id="left">
  <h3>test</h3>
    <p>Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. </p>
  <!-- end #left --></div>
  
  <div id="right">
    <h3>Right </h3>
    <p>Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. </p>
  <!-- end #right --></div>
  
  <div id="mainContent">
    <span style="text-align:left"> <img src="images/Jackielogo.gif" width="253" height="43" /> </span>
      <h2>On the Origin of The Origin</h2>
      <p>Darwin's father was dead set on his son becoming a cleric but even though the   young rapscallion started to study theology he found worms much more   interesting.</p>
      <p>When a lonely man with a moustache asked Darwin to ride with him on his boat   named after a dog, Darwin agreed and set off around the world fiddling with   wildlife.</p>
      <p>It is said that it was a load of birds from the Ecuadorean Galapagos   archipelago that inspired his now widely accepted explanation of the mechanism   of evolution. &quot;Why does that bird on that island have a beak like that while   that finch on that island has a beak like that? AHA! I've got it! Natural   Selection!&quot; he thought.

    <!-- end #mainContent -->
      </p>
  </div>
    

<!-- end #container --></div>

<!-- end #page --></div>
</body>
</body>
</html>



User is offlineProfile CardPM
+Quote Post


tommyflint

RE: Div Spacing Problem

18 Jun, 2009 - 04:08 PM
Post #2

D.I.C Addict
Group Icon

Joined: 24 Jul, 2008
Posts: 584



Thanked: 28 times
My Contributions
the bigger the width in the #container the the bigger the main section will be smile.gif

tommyflint
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 08:19AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month