Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Text Is Not Positioning In The Correct Place

    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:
    Code:
    <?php
    
    
    	// Print out the HTML page structure (header and navigation)
    	session_start();
    	if ($_SESSION['adminstatus'] == 1) {
          include_once("home_start_admin.php");
      }elseif (isset($_SESSION['logged'])) {
          include_once("home_start_logged.php");
    	  
      } else {
          include_once("home_start.php");
      }
    
    ?>
    
    
    <div id="pageheader">
    <h1>Welcome</h1>
    </div>
    <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/>
    </p>
    
    </div>

    Here is the CSS code: (the main tag can't be seen in the HTML as its included in home_start files)
    Code:
    /* MAIN FORMATTING */
    
    body {
    	height: 1000px;
    	margin:0; 
    	padding:0;
    	font-family: Arial, Helvetica, sans-serif;
    	background-image:url('Images/background.png');
    	background-repeat:repeat;
    
    }
    
    #main {
    width: 800px;
    height: 1000px;
    background-color: white;
    margin: -20px auto;
    box-shadow: 3px 3px 4px, -3px 3px 4px;
    }
    
    #pageheader{
    	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;
    
    }
    
    
    /* MAIN FORMATTING END */
    
    
    /* MAIN FONT FORMATTING */
    
    
    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;
    	}
    
    	
    /* MAIN FONT FORMATTING END */
    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:
    Code:
    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.

    Thanks!
    Attached Thumbnails Attached Thumbnails Text Is Not Positioning In The Correct Place-screen-shot-2011-05-02-00.35.11.png  

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    You have maintext width set to 600px and main set to 800px.

    as for your form...ummm <input type="textarea" name ="review" />
    Last edited by teedoff; 05-02-2011 at 01:29 AM.
    Teed

  • #3
    New to the CF scene
    Join Date
    May 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •