Div width problem

This is a discussion on "Div width problem" within the Web Page Design section. This forum, and the thread "Div width problem are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 13th, 2006, 00:00
New Member
Join Date: Oct 2006
Location: ME
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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: Select all
<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: Select all
*{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;
 
}
Reply With Quote

  #2 (permalink)  
Old Oct 13th, 2006, 23:24
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Reply

Tags
div, grr, width

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 Starting Out 5 Jan 31st, 2008 02:33
% width buttons problem - help please! uqwebdesign Web Page Design 6 Mar 29th, 2007 17:47
width problem, menu appears 'squashed' @lun Web Page Design 4 Nov 18th, 2006 11:56
new problem. document.getElementById().width returning unassigned. why? sanchopansa JavaScript Forum 2 Jul 22nd, 2006 20:23
Fluid HTML Page with one fixed column width problem melc26 Web Page Design 1 Aug 24th, 2005 21:46


All times are GMT. The time now is 16:53.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43