472,970 Members | 1,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,970 software developers and data experts.

change layout from table to div

Hi, all

I am change my webpage to using div and css for my layout, it was
using table before and I want to get rid of it.
Basically it draws a box around my content using background pictures,
but I can not get the left-border and right-border of the box working
using div. Anybody can help me?
Thanks in advance
-rockdale
here is my layout using table:

<table cellspacing="0" cellpadding="0" width="100%" align="center"
border="0" style="height: 100%">
<tbody>
<tr>
<td class="top_left"></td>
<td class="top_mid"></td>
<td class="top_right"></td>
</td>
</tr>
<tr>
<td class="center_left"></td>
<td align="left" bgcolor="#ffffff" valign="top">
CONTENT GOES HERE
</td>
<td class="center_right"></td>
</tr>
<tr>
<td class="bottom_left"></td>
<td class="bottom_mid"></td>
<td class="bottom_right"></td>
</tr>
</tbody>
</table>
and my css

td.top_left
{
background-image: url("images/top_lef_16_32.gif");
background-repeat:no-repeat;
vertical-align: bottom;
height:32px;
width: 16px;
margin-bottom:0px;
}
td.top_right
{
background-image: url("images/top_rig_24_32.gif");
background-repeat:no-repeat;
vertical-align: bottom;
height:32px;
width: 24px;
margin-bottom:0px;
}

td.top_mid
{
background-image: url("images/top_mid_16_32.gif");
background-repeat: repeat-x;
vertical-align: bottom;
margin-bottom:0px;
height:32px;

}

td.center_left
{
background-image: url("images/cen_lef.gif");
width: 16px;
}
td.center_right
{
background-image: url("images/cen_rig.gif");
width: 24px;
}

td.bottom_left
{
background-image: url("images/bot_lef.gif");
background-repeat:no-repeat;
height: 16px;
width: 16px;
}

td.bottom_mid
{
background-image: url("images/bot_mid.gif");
height:16px;
background-repeat: repeat-x;
}

td.bottom_right
{
background-image: url("images/bot_rig.gif");
background-repeat:no-repeat;
height: 16px;
width: 24px;
}
-------------------
my div
<div>
<div class="tabTopLeftCorner"></div><div class="tabTopBorder"></
div><div class="tabTopRightCorner"></div>
<div class="clear"></div>
<div class="tabLeftBorder"></div>
<div>
CONTENT GOES HERE

</div>
<div class="tabrightborder"></div>
<div class="clear"></div>
<div class="tabBottomLeftCorner"></div>
<div class="tabBottomBorder"></div><div class="tabBottomRightCorner"></
div>
<div class="clear"></div>
</div>
</div>
css for my div

.tabTopBorder
{
background-image: url("images/top_mid_16_16.png");
background-repeat: repeat-x;
border: solid 1px red;
height:16px;
width: 858px;

}
.tabBottomBorder
{
background-image: url("images/bot_mid.gif");
background-repeat: repeat-x;
border: solid 1px red;
height: 16px;
width: 858px;
}
.tabLeftBorder
{
background-image: url("images/cen_lef.gif");
background-repeat: repeat-y;
width:16px;
float:left;
border: solid 1px red;
height: 100%;

}

.tabRightBorder
{
background-image: url("images/cen_rig.gif");
background-repeat: repeat-y;
width:24px;
float:right;
border: solid 1px red;

}

.tabTopLeftCorner
{
background-image: url("images/top_lef.gif");
background-repeat: no-repeat;
width:16px;
height:32px;
float:left;
}

.tabTopRightCorner
{
background-image: url("images/top_rig.gif");
background-repeat: no-repeat;
width:24px;
height:32px;
float:right;
}

.tabBottomLeftCorner
{
background-image: url("images/bot_lef.gif");
background-repeat: no-repeat;
width:16px;
height:32px;
float:left;
}

.tabBottomRightCorner
{
background-image: url("images/bot_rig.gif");
background-repeat: no-repeat;
width:24px;
height:32px;
float:right;
}
Jun 27 '08 #1
1 2642
In article
<1d**********************************@z66g2000hsc. googlegroups.com>,
rockdale <ro************@gmail.comwrote:
Hi, all

I am change my webpage to using div and css for my layout, it was
using table before and I want to get rid of it.
Basically it draws a box around my content using background pictures,
but I can not get the left-border and right-border of the box working
using div. Anybody can help me?
It would be nice if you had posted a url showing your before and after.
It's not so hard to do...

--
dorayme
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

82
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | ...
39
by: Zak McGregor | last post by:
Hi all Are there any good solutions to aligning form field names and input boxes without resorting to tables? I am struggling to do this nicely at the moment. Thanks Ciao Zak
47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
9
by: Peter | last post by:
Hi at all, how can I do to make a css file to change automatically the text size of the text that is into a table relatively the screen size? I.E. if the screen is 800 x I want the text...
4
by: Spartanicus | last post by:
I've started work on a css layout tutorial. I expect that it will take a minimum of several weeks to get to a complete draft stage. I hope to get better feedback by publishing individual pages....
20
by: Tammy | last post by:
What would be a good alternative to using frames? I need something that will section my webpage into two halves and can change both frames on a single click. Thanks in Advance, Tammy
11
by: SarahMarsden | last post by:
I'm new to Dreamweaver (using MX 2004). I have a 2 row 3 column table. I have set each column to 200 pixels. The second row I have merged into one cell. When I enter text (or anything else) into...
53
by: brave1979 | last post by:
Please check out my javascript library that allows you to create any layout for your web page, nested as deep as you like, adjusting to width and height of a browser window. You just describe it in...
3
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RecordSource of a Master Report is: Me.RecordSource = "TableOrQueryName"
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
3
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.