View Full Version : Text Is Not Positioning In The Correct Place

05-02-2011, 01:43 AM
Hi Guys,

I'm having a slight problem in coding my website. The text on the page seems to be constricted to a small area, but I'm not sure why. As you can see by the image, I've highlighted the width of the div in red, but for some reason, the text always stops at a particular part of the page, and doesn't go the full way across. The same thing doesn't just happen with the content, but with some of the white headings too (even though the heading div is 800px wide and its the same code in all pages, and the main content div is 600px wide), the text still doesn't move past a particular area.

Here is the HTML code:


// Print out the HTML page structure (header and navigation)
if ($_SESSION['adminstatus'] == 1) {
}elseif (isset($_SESSION['logged'])) {

} else {


<div id="pageheader">
<div id="maintext">
<h2>Welcome to Loudspeaker, <?php echo $_SESSION['username'] ?></h2>

<p>Use the links at the top of the page to navigate around the site, or search for an album review in the search box.<br/><br/><br/>

The <strong>Home</strong> link lets you view the latest reviews submitted by other users.<br/><br/>
The <strong>News</strong> link lets you view the latest music news.<br/><br/>
The <strong>Reviews</strong> link lets you view more reviews.<br/><br/>
The <strong>User / Admin</strong> link lets you view your own personal account.<br/><br/>
The <strong>Logout</strong> allows you to logout of the website.<br/><br/>


Here is the CSS code: (the main tag can't be seen in the HTML as its included in home_start files)


body {
height: 1000px;
font-family: Arial, Helvetica, sans-serif;


#main {
width: 800px;
height: 1000px;
background-color: white;
margin: -20px auto;
box-shadow: 3px 3px 4px, -3px 3px 4px;

height: 45px;
width: 800px;
background: url(Images/headerpage.png);

#maintext {
padding-left: 20px;
padding-right: 20px;
pdding-top: 40px;
padding-bottom: 20px;
width: 600px;
background-color: red;




h1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 30px;
font-weight: bold;
color: white;
padding-left: 20px;

h2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;

h3 {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;

h4 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;

strong {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;

p {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
margin-top: 20px;


If anyone has any ideas on how to solve this problem it would be helpful, I've been trying to work it out for the past few hours but I'm stumped.

Also, another quick question...
I have a form for people to submit reviews on. However at the moment, the form review code is:

Full Review Of Album: <input type='text' name='review' /><br />
Obviously, that box is too small to type in a long review. How could I change it to textarea, but still keep the information submitting into the php mysql form?

If anyone could help me out it would be much appreciated.


05-02-2011, 02:26 AM
You have maintext width set to 600px and main set to 800px.

as for your form...ummm <input type="textarea" name ="review" />

MML Design
05-03-2011, 02:14 AM
Hi Cjc1706,

I am a newbie here but I will try to help. Did you add something to the left hand side of the website, because what seems to be happening (well DUH) is that a form or something is pushing it over or some sort of object. I am on the fly but the width and padding and such, something is acting up. Try playing with different padding's. Sorry, I know I probably didn't help much, but I tried...

Haha, Have a good one!

-Will, MML Design