Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old October 12th, 2006, 08:00 PM   #1
New Member
 

Join Date: Oct 2006
Location: ME
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 NiKnight is on a distinguished road
Div width problem

Hey everyone
im having a problem with the width of my main (content) div. when i add text it expands with the text (instead of automaticly going down a line) although i have placed a width: property.
currently the width is set to auto however when a fixed number (Xpx) is placed it still happens, however overflow:scroll elimates the overlapping but adds a yucky scroll bar.
any ideas?
code:
html:
Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
  <meta http-equiv="Content-type" content="text/html;
 charset=iso-8859-1" />
  <meta http-equiv="Content-Language" content="en-us" />
  <link href="hodvehadarstyle.css" rel="stylesheet" type="text/css" />
 </head>
 <body>
  <div class="box">
  <div class="header"></div>
  <div class="contentarea">
   <div class="menucont">
 
   </div>
   <div class="right">
   </div> 
   <div id="content">
     <p> 
   </div>
  </div>
  </div>
 
</body>
</html
css (i excluded hyperlink related style to save room)
Code:
*{margin: 0px; padding: 0px;}
body{
 background-color: #dddbcd;
 font-size: xx-small;
 font-family: "Lucida Sans", serif;
 background-image: url('bg.jpg');
 background-repeat: repeat-y;
} 
div.box{
 position: relative;
 
 width: 750px;
 max-width: 750px;
 text-align: left;
 
 color: #737373;;
}
div.header{
 width: 750px;
 height: 150px;
 
 background-image: url('header.jpg');
 background-repeat: no-repeat;
}
div.contentarea{
 position: relative;
 width: 750px;
 max-width: 750px;
 height: 800px;
 
}
div.menucont{
 position: absolute;
 top: 0px;
 left: 0px;
 width: 115px;
 height: 100%;
 margin-top: 5pt;
 text-align: center;
 margin-left: 30px;
}
div.right{
 position: absolute;
 right: 0px;
 top: 0px;
 width: 150px;
 height: 100px;
 text-align: center;
 margin-top: 5pt;
 margin-right: 30px;
 font-family: sans-serif;
 font-size: small;
}
#content{
 width: auto; 
             margin: 6pt 185px 0 150px;
 font-family: sans-serif;
 font-size: medium;
 color: inherit;
 height: 75%;
 overflow: scroll;
 
}
NiKnight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 13th, 2006, 07:24 PM   #2
Elite Veteran
 
Ryan Fait's Avatar
 

Join Date: May 2006
Location: Las Vegas
Posts: 3,784
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough
Re: Div width problem

It'd be helpful to see this in action. From looking at your code, though, it looks like it may be a positioning problem.
Ryan Fait is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
div , grr , width


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Length problem solved, now width. Manic056 Your Design and Layout 5 January 30th, 2008 10:33 PM
% width buttons problem - help please! uqwebdesign HTML, XHTML and CSS 6 March 29th, 2007 01:47 PM
width problem, menu appears 'squashed' @lun HTML, XHTML and CSS 4 November 18th, 2006 07:56 AM
new problem. document.getElementById().width returning unassigned. why? sanchopansa JavaScript 2 July 22nd, 2006 04:23 PM
Fluid HTML Page with one fixed column width problem melc26 HTML, XHTML and CSS 1 August 24th, 2005 05:46 PM


Search Engine Optimization by vBSEO 3.2.0 RC8