x10Hosting Forums

Corporate Free Hosting for the Masses.



Register

Reply
 
LinkBack Thread Tools Display Modes
x10 Elder

Twinkie's Avatar

Join Date: Sep 2007
Posts: 572
Credits: 4,948
Twinkie is a glorious beacon of light
Location: Ft. Lauderdale, Florida

Send a message via MSN to Twinkie
Quote  
09-29-2008, 12:38 AM
DIV as Table?

Could someone do me a favor and look at the source code of http://twinkie.pcriot.com and tell me if it is possible to accomplish the same effect the table does with DIV tags and CSS? Thanks a lot
HTML Code:
<style type="text/css">
body { margin:0px; background-color:#204274; color:#FFFFFF;}
a { text-decoration:none; color:#FFFFFF; font-weight: bold; }
a:visited { text-decoration:none; color:#FFFFFF; font-weight: bold; }
a:hover { text-decoration:underline; color:#FFFFFF; font-weight: bold; }
div.words {
width: 466px;
}

div.a {
margin: 5px;
}

table.mytable td {
text-align: center;
}
</style>
</head>
 <body><div align="center">
<script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><br />
<script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><br />
<table border="0" cellspacing="0" cellpadding="0" class="mytable" margin="0" padding="0"><tr><td>
<script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script>
<div class="a"><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script></div>
<div class="a"><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script></div>
<div class="a"><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script></div>
<div class="a"><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script></div>
</td><td><div class="words"><h2>This Web Site is Under Construction</h2>
<p>This site is under contruction. It is a personal testing site to develope web applications and to improve my scripting skills. This is not used for any purpose as of yet. I will be adding a home page with links to all of my web applications soon. What I am working on now is creating my home page and posting my first ever web site! It was a socal studies fair project about the Boston Massacre!</p>
<p>"The great thing about this paragraph is that once you realize it does not say anything, it is too late to stop reading it. You must be a real <b>loser</b> be reading this. Now that you have read the whole thing, go away!" - Walmart Shirt</p>
<p><u>My First Web Project</u></p></div></td><td>
<script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script>
<div class="a"><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script></div>
<div class="a"><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script></div>
<div class="a"><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script></div>
<div class="a"><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script></div></td></tr></table>
<script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><br />
<script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><br />
<script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><br />
<script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><script type="text/javascript" src="http://x10hosting.com/adserve.js?MTwinkie"></script><br />
</center>
__________________
~~Twinkie~~


Reply With Quote
Twinkie is offlineReport Post
x10 Sophmore

Scoochi2's Avatar

Join Date: Aug 2008
Posts: 118
Credits: 1,277
Scoochi2 will become famous soon enough
Location: Southport!

Quote  
09-29-2008, 11:57 AM
Re: DIV as Table?

Maybe it's just me, but I see absolutely no purpose for that table... I mean, it does nothing.
Except centre the text.

Yeah, you can do that in a DIV
Code:
div {
margin: 5px;
text-align: center;
}
__________________
If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending...

Last edited by Scoochi2; 09-29-2008 at 11:58 AM.
Reply With Quote
Scoochi2 is offlineReport Post
x10 Elder

Twinkie's Avatar

Join Date: Sep 2007
Posts: 572
Credits: 4,948
Twinkie is a glorious beacon of light
Location: Ft. Lauderdale, Florida

Send a message via MSN to Twinkie
Quote  
09-29-2008, 05:52 PM
Re: DIV as Table?

The idea for the table is to keep that line a line. DIV use line breaks as default and for some reason, the ad object lost it's margin. So, I had to use a DIV to give it that margin back. Then, it did not want to stay in line and thus, the table. Do you know how I could have avoided the table?

PS: I don't think that would work because of the default line breaks in the DIV would separate the line.
__________________
~~Twinkie~~


Reply With Quote
Twinkie is offlineReport Post
x10Hosting Member

Join Date: May 2008
Posts: 53
Credits: 405
scopey is on a distinguished road
Quote  
09-30-2008, 12:11 AM
Re: DIV as Table?

Read up on google. Making tables out of divs uses a good knowledge of the float: and display: css attributes... Something I can't help with. In my experience, div tables are just a lot more hassle than tables. I would just stick to tables, no point in changing unless you come across any limitations.
__________________
- When in doubt, refer to the PHP manual.
Reply With Quote
scopey is offlineReport Post
Reply

Thread Tools
Display Modes

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
MysQL Query for Master table & child table phpasks Programming Help 8 08-07-2008 09:07 AM
Enabling IP addresses in your firewall. 1337scape Free Hosting 32 11-15-2007 02:40 PM
INSERT command denied?? 1337scape Free Hosting 6 11-14-2007 06:15 PM
[IPB] Contiguous Board Index phenetic Tutorials 5 09-18-2005 11:31 AM
Table inside table wizeman Tutorials 4 07-11-2005 06:56 PM


All times are GMT -5. The time now is 06:11 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC7
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

Bad Credit Mortgages | Loans | Loan | Loans | Loans