- This topic is empty.
-
AuthorPosts
-
October 2, 2011 at 10:28 pm #34611
DonL
MemberOK, I’m starting to get the hang of this CSS stuff. I’ve got a website and have started using an external CSS sheet to format body, h1, h2, links, p, etc. The only one I haven’t figured out yet is setting table characteristics. If I use the “table” tag, none of external CSS features show up. If I do the same CSS inline right after
October 3, 2011 at 9:25 am #88300DonL
MemberHi,
Here’s a big chunk of my external CSS, including the table section. Below that is the inline style I use that works. Thanks for looking at it.
/* SETS BACKGROUND COLOR FOR THE WHOLE PAGE */
body {background-color:yellow;
margin-left: 200px;
margin-right: 200px
width: 900px;
}
/* SETS COLOR, FONT AND ALIGNMENT FOR THE MAIN TITLE */
h1 {
font-family:"Trebuchet MS",Arial,"sans-serif";
font-size:36px;
color:Navy;
font-style:italic;
font-weight:bold;
text-align:center;
}
/* SETS COLOR, FONT AND ALIGNMENT FOR SECTION HEADINGS */
h2 {
font-family:"Trebuchet MS",Arial,"sans-serif";
font-size:17px;
color:Navy;
font-style:italic;
font-weight:bold;
text-align:center;
}
/* FORMATS TEXT IN THE MAIN PARAGRAPHS */
p {
font-family:"Trebuchet MS", Arial, "sans-serif";
color:#000000;
font-size:13px;
font-weight:bold;
text-align:left;
vertical-align:text-top;
}
/* FORMATS TEXT IN THE PICTURE CAPTIONS */
h3 {
font-family:Arial,"sans-serif";
color:#800000;
font-weight:bold;
font-style:italic;
text-align:left;
font-size:10px;
}
/* FORMATS BOOKMARK HYPERLINKS */
.links2 {list-style-type: none;
padding-left: 0;
margin-left: 0;
display: block;
color: #800000
font-family: Arial;
font-weight: bold;
text-align: left;
font-size: 13px;
font-style: italic;
}
/* FORMATS HORIZONTAL LINE UNDER THE TITLE */
hr {
border:0;
color:#800000;
height:2px;
width:70%;
}
/*FORMATS TABLE PROPERTIES */
table {
border-collapse:collapse;
border:5px solid red;
width:34%;
align:right;
float:right;
font-family:Arial,"sans-serif";
color:green;
font-weight:bold;
font-style:italic;
text-align:left;
font-size:11px;
}
Edit: Code tags added by Mod
October 3, 2011 at 10:56 am #88305DonL
MemberOK. Found it. This is my first time posting here. Do you need me to resend anything?
October 3, 2011 at 9:14 pm #88409thomas
MemberWhich external styles aren’t working correctly? The only reason an inline style should work when an external one doesn’t is if the external rule is being overwritten by another rule.
If possible, you should avoid inline styles.
October 3, 2011 at 10:05 pm #88420DonL
MemberThe section that isn’t rendering correctly is the table section. Do I also need to declare for cells/rows or other table elements even if I don’t want them highlighted?
AuthorPostsViewing 5 posts - 1 through 5 (of 5 total)- The forum ‘CSS’ is closed to new topics and replies.