 |
| Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more. |
|
 |
11-22-2003, 11:43 AM
|
#1 (permalink)
|
|
Contributing Member
Join Date: 10-13-03
Location: Atlanta, GA
Posts: 1,135
|
CSS border question?
I wanted to know how to do a css border that would be 1 pixel wide and is #A1A1A1. All the way around. when I used this code, it apeared messed up:
[code:1:25181e7e80]<table width="736" border="1" style="border: solid #A1A1A1 border-width: 1" bgcolor="#ffffff" cellpadding="0" cellspacing="0">[/code:1:25181e7e80]
I also tryed thin in the width, but was still messed up.
Thanks in advanced!!
|
|
|
11-22-2003, 11:45 AM
|
#2 (permalink)
|
|
No Longer Here
Join Date: 09-27-03
Location: State College, PA
Posts: 4,273
Latest Blog: None
|
Use this:
[code:1:1087b9f3b8]<table width="736" border="0" style="border: 1px solid #A1A1A1" bgcolor="#ffffff" cellpadding="0" cellspacing="0">[/code:1:1087b9f3b8]
|
|
|
11-22-2003, 11:46 AM
|
#3 (permalink)
|
|
Senior Member
Join Date: 10-13-03
Location: Work, USA
Posts: 2,796
Latest Blog: None
|
do you need to put a ; after the 1"?
|
|
|
11-22-2003, 11:47 AM
|
#4 (permalink)
|
|
No Longer Here
Join Date: 09-27-03
Location: State College, PA
Posts: 4,273
Latest Blog: None
|
Not sure if you have to, but just in case:
[code:1:674aedea69]<table width="736" border="0" style="border: 1px solid #A1A1A1;" bgcolor="#ffffff" cellpadding="0" cellspacing="0">[/code:1:674aedea69]
|
|
|
11-22-2003, 11:58 AM
|
#5 (permalink)
|
|
Senior Member
Join Date: 10-13-03
Posts: 220
Latest Blog: None
|
Quote:
|
do you need to put a ; after the 1"?
|
You don't have to if it's the last thing that you have in that selector.
For example, you do have to put one at the end of the font-family definition here:
[code:1:09c89b642f]
.annoying {font-family: arial; color: 00ff00;}
[/code:1:09c89b642f]
But you don't have to put one after the background definition in the following example:
[code:1:09c89b642f]
body {background: #ffffff}
[/code:1:09c89b642f]
Although, it is a good idea to put a semi-colon after everything incase you decide to add onto it, since it's really easy to forget to add it when you put more stuff in there.
Sorry, I'm bored. 
|
|
|
11-22-2003, 12:07 PM
|
#6 (permalink)
|
|
Contributing Member
Join Date: 10-13-03
Location: Atlanta, GA
Posts: 1,135
|
Quote:
|
Originally Posted by Jazzee
Use this:
[code:1:15b71fd5fa]<table width="736" border="0" style="border: 1px solid #A1A1A1" bgcolor="#ffffff" cellpadding="0" cellspacing="0">[/code:1:15b71fd5fa]
|
nope, thats for the help, but didn't work.
|
|
|
11-22-2003, 12:12 PM
|
#7 (permalink)
|
|
No Longer Here
Join Date: 09-27-03
Location: State College, PA
Posts: 4,273
Latest Blog: None
|
That has to work. That is the code. Works for me 
|
|
|
11-22-2003, 12:19 PM
|
#8 (permalink)
|
|
Senior Member
Join Date: 10-13-03
Posts: 220
Latest Blog: None
|
Try it with an embedded style sheet like this:
[code:1:cccad6d51e]
<style type="text/css">
table {
border: 1px solid #A1A1A1;
}
</style>
[/code:1:cccad6d51e]
And, if you're trying to make a border around the table AND the cells in the table then add this to the style above:
[code:1:cccad6d51e]
td {
border: 1px solid #A1A1A1;
margin: -1px 0 0 -1px;
}
[/code:1:cccad6d51e]
The margins keep the border from doubling up. 
|
|
|
11-22-2003, 12:32 PM
|
#9 (permalink)
|
|
Contributing Member
Join Date: 10-13-03
Location: Atlanta, GA
Posts: 1,135
|
I fixed it, I embedded it in CSS as a class, then I had to delete the border=1 from the table.
|
|
|
11-22-2003, 06:23 PM
|
#10 (permalink)
|
|
Moderator
Join Date: 10-13-03
Location: UK
Posts: 2,468
Latest Blog: None
|
"I had to delete the border=1 from the table"
that was probably the bit that did it
|
|
|
11-22-2003, 07:27 PM
|
#11 (permalink)
|
|
Senior Member
Join Date: 10-13-03
Posts: 220
Latest Blog: None
|
I thought that it was already taken out when I posted, since he had border="0", so I thought that the inline style was the problem. 
|
|
|
11-22-2003, 07:33 PM
|
#12 (permalink)
|
|
No Longer Here
Join Date: 09-27-03
Location: State College, PA
Posts: 4,273
Latest Blog: None
|
Quote:
|
Originally Posted by Distorted
I thought that it was already taken out when I posted, since he had border="0", so I thought that the inline style was the problem. 
|
I had border="0". He had border="1".
|
|
|
11-22-2003, 07:34 PM
|
#13 (permalink)
|
|
Senior Member
Join Date: 10-13-03
Posts: 220
Latest Blog: None
|
Oh, I see. 
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:54 AM.
© Copyright 2008 V7 Inc Powered by vBulletin Copyright © 2000-2009 Jelsoft Enterprises Limited.
|
|
|