Web Design Forums

HTML and CSS Help

Having problems with these web design scripting? Ask here.

Can't Make Page Full Width - HTML/CSS Prob



Site of the Month Nominations
ENTER YOUR SITE NOW!

Reply
 
LinkBack Thread Tools
Old January 24 '10, 05:25 PM (#1)
MikuruX is offline
New Member!
 
MikuruX's Avatar
 
Join Date: January 2010
Posts: 4
MikuruX is an unknown quantity at this point
Can't Make Page Full Width - HTML/CSS Prob

Hello!

This is my first time ever trying to make a website using CSS to make a web page. I'm currently using Dreamweaver CS4 (noob with this also) and I've managed to get the basic layout of my page done but when I check it in a browser, It never comes out to full width/height and I keep getting the white border around the far edges of my page.

Live Example: http://www.animetoshokan.org/template.html

Here is what my current code looks like so far:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" ><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head>
<title>Anime Toshokan Inc. :: We've Been Waiting For You! :: Ver 11.1 :: Revival Serenade</title>
<style type="text/css">
#body {background: #ffffff;
       border-left: solid;
       border-left-width: 0;
       border-right: solid;
       border-right-width: 0;
       border-top-style: solid;
       border-top-width: 0;
       border-bottom-style: none;
       border-bottom-width: medium;
       }

#header {background: #0000ff;
         background-image: url(headerbg.png);
         border-left: solid;
         border-left-width: 0;
         border-right: solid;
         border-right-width: 0;
         border-top-style: solid;
         border-top-width: 0;
         border-bottom-style: none;
         border-bottom-width: medium;
         }

#menu {background: #00ff00;
       background-image: url(menubarbg.png);
       }

#maincol {background: #ffffff;
          background-image: url(contentbg.png);
          background-repeat: no-repeat;
          }

#footer {background: #ff0000;
         background-image:url(footerbg.png);
         }

</style>
</head>



<body id="body">
<div id="pagewidth">
<!--------- Header Area --------->
<div id="header">

<center>
<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="#111111"  style="height: 168px">
 <tr valign="top">
     <td height="168">
     
     
     
     </td>
 </tr>
</table>
</center>


</div>

<!--------- Main Menu Area --------->
    <div id="menu" >

<center>
<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="#111111"  style="height: 75px">
 <tr valign="top">
     <td height="75">
     
     
     
     </td>
 </tr>
</table>
</center>


</div>

<!--------- End of Main Content Area --------->


<!--------- Main Content Area --------->
<div id="maincol" >
<center>
<table width="85%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0" bordercolor="#111111"  style="height: 800px">
 <tr valign="top">
     <td height="180">
     
     Main Content Here
     
     </td>
 </tr>
</table>
</center>
</div>
<!--------- End of Main Content Area --------->

<!--------- Footer Area --------->
    <div id="footer" >
    
<center>    
    <table width="85%" cellpadding="0" cellspacing="0" border="0" bordercolor="#111111"  style="height: 80px">
 <tr valign="top">
     <td height="80">
     
     
     
     </td>
 </tr>
</table>
</center>
</div>
<!--------- End of Footer Area --------->
    </div>
</body>
</html>
Can anyone help me out with this by pointing out my error or giving me some tips on what to do so I wont this kind of mistake again?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 24 '10, 06:58 PM (#2)
Dorky is offline
Freelance
 
Dorky's Avatar
 
Join Date: June 2009
Location: Destin Florida
Posts: 905
Dorky will become famous soon enough
add this line in the body css

margin: 0px;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 24 '10, 07:22 PM (#3)
MikuruX is offline
New Member!
 
MikuruX's Avatar
 
Join Date: January 2010
Posts: 4
MikuruX is an unknown quantity at this point
Ah! That did the trick. Thank you so much for that, I really appreciate it. ^^
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 24 '10, 08:35 PM (#4)
Dorky is offline
Freelance
 
Dorky's Avatar
 
Join Date: June 2009
Location: Destin Florida
Posts: 905
Dorky will become famous soon enough
very cool, glad i could help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 2 '10, 08:04 AM (#5)
5online is offline
Account Closed
 
5online's Avatar
 
Join Date: January 2010
Posts: 1
5online is an unknown quantity at this point
following will work:
for css :
background: #ffffff;
background-image: url(contentbg.png);
background-repeat: no-repeat;

for table:

<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="#111111" style="height: 75px">
<tr valign="top">
<td height="75">



</td>
</tr>
</table>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 6 '10, 11:08 PM (#6)
diddy is offline
[insert witty comment here]
 
diddy's Avatar
 
Join Date: June 2008
Location: Sydney, Australia
Posts: 500
diddy will become famous soon enoughdiddy will become famous soon enough
Glad that you got the help you're looking for.

Just wanted to point some things out in your code (remembering that you're a noob).

Try not to use the <center> tag. text-align: center; will work just fine in CSS. Try to do as much with CSS as you pssibly can. Remember your XHTML doctype and stick to it. Try to use DIVs over <table> for site layout. Tables are for tabular data, not website layout.
I found it a great help going to these links, it'll clear a lot up:
http://www.w3schools.com/css
http://www.w3schools.com/xhtml
http://w3schools.com/tags/default.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 8 '10, 12:55 PM (#7)
Dorky is offline
Freelance
 
Dorky's Avatar
 
Join Date: June 2009
Location: Destin Florida
Posts: 905
Dorky will become famous soon enough
text-align: center; is for text, as implied by the leading word "text". center is just fine providing you are not using it with position: absolute; and the proper way to center using css is to declare a width and left/right auto margins.

when talking down to a noob, be sure you dont look as one yourself.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 8 '10, 12:59 PM (#8)
Dorky is offline
Freelance
 
Dorky's Avatar
 
Join Date: June 2009
Location: Destin Florida
Posts: 905
Dorky will become famous soon enough
oh yes, and to center for a dynamic width use position: absolute; width: auto; and declare your left/right px.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 8 '10, 05:01 PM (#9)
diddy is offline
[insert witty comment here]
 
diddy's Avatar
 
Join Date: June 2008
Location: Sydney, Australia
Posts: 500
diddy will become famous soon enoughdiddy will become famous soon enough
<center>, while technically not 'wrong" (allthough in html 5 it probably will be) is frowned upon by the w3c. There are better ways imo.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 10 '10, 04:31 AM (#10)
diddy is offline
[insert witty comment here]
 
diddy's Avatar
 
Join Date: June 2008
Location: Sydney, Australia
Posts: 500
diddy will become famous soon enoughdiddy will become famous soon enough
Quote:
Originally Posted by 5online5
the thing is that you full width then you need to give table width 100% so it will extend as much as resolution streches .
Yes, that will work. In fact it works in any element, for example tables and divs.
I would wrap the site in a div, not a table, but the point is that the 100% width statement is the key. But definately use the CSS:

Code:
width: 100%;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 10 '10, 07:56 PM (#11)
Dorky is offline
Freelance
 
Dorky's Avatar
 
Join Date: June 2009
Location: Destin Florida
Posts: 905
Dorky will become famous soon enough
Quote:
is frowned upon by the w3c
no such thing in data. 1 or 0 - on or off - true or false.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  Web Design Forums » Programming Help » HTML and CSS Help

Bookmarks


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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frontpage basics tonyf12 Software Articles & Tutorials 9 January 26 '10 07:29 AM
full screen html page for swf file shekar Adobe Photoshop Help 4 January 14 '06 02:15 AM
Wanted..nice person to make a cute layout for a personal page love310 For Hire / Wanted 2 July 28 '05 02:02 AM
Efficient PHP/MySQL Page Counter futureal PHP 5 June 10 '03 12:03 AM
how to make a page where people can talk and listen? aladdin 6184 Website Ratings and Reviews 0 April 17 '03 09:56 AM

 
User Infomation
Your Avatar

Site Of The Month

Ticket Cake
Ticket Cake

Ticket Cake is a drupal based event ticketing platform. It features that ability to browse events and share them.

Nominate Your Site Now!

Advertisement
WolfCMS.org

Latest Articles
- by RickM
- by bfsog

Advertisement

Partner Links



All times are GMT -4. The time now is 02:39 AM.


WebDesignForums.net is Copyright © 2010 RikeMedia.

SEO by vBSEO

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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163