It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

One column centered but text overflow

One column centered but text overflow

Postby Albert1955 on Wed Aug 13, 2008 6:47 am

hello
I am trying to do a simple one column page with three divs all same width under each other
But if I put in more text into the 'content' div, it overflows onto the right space and is not contained within the div
what am i doing wrong ? here is the 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">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>alo consulting</title>
<style type="text/css">
* { padding: 0; margin: 0;}

body {
font-family: arial, sans-serif;
font-size: 1.0em;
color: #00ffaa;
background: #00f0f2;
}

#wrapper {
margin: 0 auto;
width: 800px;
background: #ffffff url(images/bg.gif);
background-repeat-y;
}

#phone {
width: 800px;
padding: 10px;
height: 100px;
margin: 0px 0px 0px 0px;
background: #a3a3a3;
}

#logo {
width:800px;
padding: 10px;
height: 200px;
margin: 0px 0px 0px 0px;
background: #aabbff;
}

#content {
width: 800px;
padding: 10px;
height: 350px;
margin: 0px 0px 0px 0px;
background: #224455;
}
</style>

</head>
<body>

<div id="wrapper">

<div id="phone"> p 9511 1111 | m 0418 111 111 | f 1113 1111
</div>

<div id="logo">some stuff goes here as well as logo
</div>

<div id="content">
service.support.solutions.service.support.solutions.service.support.solutions.service.support.solutions.
</div>
</body>
</html>

any help would be received with thanks
A
Albert1955
 
Posts: 9
Joined: Sat May 26, 2007 9:06 am

Re: One column centered but text overflow

Postby X-Bumble on Fri Mar 06, 2009 7:49 pm

What browser is doing this (it's going to be Internet Explorer 7 or below I bet...).

I just used your code and it is fine with FF3.

By the way, you don't need to specify margins as Zero in each div as you done because you have already declared them to be zero via the global command (*).
X-Bumble
 
Posts: 8
Joined: Tue Feb 17, 2009 12:31 am

Re: One column centered but text overflow

Postby rangana on Sat Mar 07, 2009 12:50 am

Looks fine on IE at my end. Please elaborate a little further.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines


Who is online

Users browsing this forum: MSN [Bot] and 1 guest