473,394 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Border Problems

I am doing something so simple but I can't seem to get the right
results.

I want the border of my <td> to start after 39px, just like the text.

..td
{
padding-left: 39px;
padding-top: 5px;
border-top: 1px solid #cc9900
}

The text is padded but the border stretches across the whole cell. If
I use margin-left instead, the text doesn't indent 39px. Can someone
help???
Jul 20 '05 #1
2 2201
/John/:
I am doing something so simple but I can't seem to get the right
results.

I want the border of my <td> to start after 39px, just like the text.

.td
{
padding-left: 39px;
padding-top: 5px;
border-top: 1px solid #cc9900
}

The text is padded but the border stretches across the whole cell. If
I use margin-left instead, the text doesn't indent 39px. Can someone
help???


Table cells don't have margins, consult with
<http://www.w3.org/TR/CSS21/tables.html>. Just use a container
element inside the table cell:

<td>
<div class="hopa">Your text</div>
</td>

div.hopa {
margin-left: 39px;
padding-top: 5px;
border-top: 1px solid #cc9900
}

--
Stanimir
Jul 20 '05 #2
Thank you very much! That was driving me insane!!!
Stanimir Stamenkov <s7****@netscape.net> wrote in message news:<c5*************@ID-207379.news.uni-berlin.de>...
/John/:
I am doing something so simple but I can't seem to get the right
results.

I want the border of my <td> to start after 39px, just like the text.

.td
{
padding-left: 39px;
padding-top: 5px;
border-top: 1px solid #cc9900
}

The text is padded but the border stretches across the whole cell. If
I use margin-left instead, the text doesn't indent 39px. Can someone
help???


Table cells don't have margins, consult with
<http://www.w3.org/TR/CSS21/tables.html>. Just use a container
element inside the table cell:

<td>
<div class="hopa">Your text</div>
</td>

div.hopa {
margin-left: 39px;
padding-top: 5px;
border-top: 1px solid #cc9900
}

Jul 20 '05 #3

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

Similar topics

33
by: Thomas Mlynarczyk | last post by:
Hi, I'm looking for a way to put a 1px solid border around the image in this link: <a href="some.html"><img src="some.gif"></a> Well, that, by itself, is simple. However, I would like to have a...
7
by: Mary Ellen Curtin | last post by:
The client wants the page to have both a left border (purple) and a right border (green). Is there any way to stretch a background image to fit the viewport? Or should I divide the background...
4
by: David Ehmer | last post by:
I have some buttons I'm working on at this address http://www.boatingaccessories.com.au/test3.htm In NS7, Mozilla and Opera, the borders don't render. IE6 displays as intended. Appreciate...
7
by: Marek Mänd | last post by:
When using <TABLE rules="all"> Mozilla 1.6 and previous versions draw a nasty interiour border, which doesnt go away though I have on TD's css border:none set. Is it something wrong with my...
12
by: Cameron McCormack | last post by:
Hi. I have a couple of problems with borders, where the appearance in IE and Mozilla differs. In my test file http://mcc.id.au/~cam/border.html I have a large double border-left on the...
19
by: Eva | last post by:
Hi, I'm really really really new to javascripts and so i couldn't really comprehend thoroughly on the the previous posts regarding this issue. Anyways, I'm setting up a picture album site....
1
by: Keith Smith | last post by:
When I use this code.... window.open('gallery/pic1.jpg','windowname','width=775,height=550,resizable=yes,scrollbars=yes,top=10,left=10'); ....my web page displays a picture with a white border...
3
by: Tim | last post by:
hi, I have some code that works in all web browsers except IE 5.2 for Mac (heard this one before? :-) the CSS code basically creates two id's, one is a container for the other. eg: CSS...
2
by: Asterbing | last post by:
Hi all. I'm trying and don't succeed to include an HTML page into another without any border nor visible scroll-bar. Even if I would like something which will work under Netscape too, at this...
0
by: silco | last post by:
Hi Everyone.. hope you can help! I have a IE6 border bug, most of the common fixes tell me to use relative on my container divs. This fixed some problems but now I have a left border problem...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.