![](http://content.invisioncic.com/r49260/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
SillyBilly
-
Posts
109 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by SillyBilly
-
-
CSS
in HTML/XHTML
Is your CSS saved as a .css file? With the link you have, you need to have your stylesheet saved as a .css file. It looks as if it's saved as a web page. Try using a plain text editor such as Notepad and save this as "mystyle.css" file in the same directory as "index.htm". Try this:/* My Stylesheet /*body {background-image: pictures/blackmarble3.gif;font-family: verdana,helvetica,arial,sans-serif;color: #FFFFCC;link: #33CCFF VLINK: #FF6666;margin: 0em 2em 0em 2em;}h1,h2,h3, h4,{text-align: center;font-family: Georgia,"Times New Roman",Times,serif;}
All of the HTML tags don't belong in a style sheet, just the styles you are defining. Then you save it as a .css file for the page to be able to access it if you are accessing it as an external style sheet.
background-image: url("pictures/blackmarble3.gif");
I played around and found that the code for the background gif was incorrect. I show the corrected code above, which now works. I also took out all the HTML elements in the CSS that were not necessary, as you suggested.I noticed that the end tag for the comment is reversed in your suggestion. I changed it to */I just noticed the post from F-Man. I'll correct the link properties. I'll also try the gif without the quotes.Thanks to both of you for the suggestions, and for giving me a fresh look at the code. If I have any other problems, I'll start a new thread.
-
CSS
in HTML/XHTML
Thanks for your answer and suggestions.I have the file saved as mystyle.css You will notice that I have referenced it by<link href="mystyle.css" ...>Yes, it is in the same directory as the index.html fileI'll try the code that you have posted.Have I called the stylesheet correctly from the index.html file?Is your CSS saved as a .css file? With the link you have, you need to have your stylesheet saved as a .css file. It looks as if it's saved as a web page. Try using a plain text editor such as Notepad and save this as "mystyle.css" file in the same directory as "index.htm". Try this:/* My Stylesheet /*body {background-image: pictures/blackmarble3.gif;font-family: verdana,helvetica,arial,sans-serif;color: #FFFFCC;link: #33CCFF VLINK: #FF6666;margin: 0em 2em 0em 2em;}h1,h2,h3, h4,{text-align: center;font-family: Georgia,"Times New Roman",Times,serif;}
All of the HTML tags don't belong in a style sheet, just the styles you are defining. Then you save it as a .css file for the page to be able to access it if you are accessing it as an external style sheet.
-
CSS
in HTML/XHTML
Thank you for the quick reply. I made the three corrections in the CSS but the index.html does not reflect the code. In fact it seems to ignore it completely, because the text is black and the background is white. I am including both the CSS and the index.html for your comments. TIA.I'm assuming this is a comment, if so it should be written as <!-- My Stylesheet -->You also need to add the semicolons at the end of the background-image & color properties.Try that first and see what happens.<!--DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3org/TR/html4/loose.dtd"--><html><head><--!My Stylesheet--><style type="text/css">body {background-image: pictures/blackmarble3.gif;font-family: verdana,helvetica,arial,sans-serif;color: #FFFFCC;link: #33CCFF VLINK: #FF6666;margin: 0em 2em 0em 2em;}h1,h2,h3, h4,{text-align: center;font-family: Georgia,"Times New Roman",Times,serif;}</style></head></html>*****************************************************************<!--DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3org/TR/html4/loose.dtd"--><html><head><link href="mystyle.css" rel="stylesheet" type="text/css"><title>Welcome to The Coalminers' Site</title></head><h1>Welcome to the The Coalminers' Site</h1><hr><p>On this site you will find information about the Collier family, their roots, history, coat of arms, family trees, photos, and more.</p><p>The site is divided into topics which can be accessed directly from the links at the bottom of each page.</p><p>The pages containing the <b><i>Coat of Arms</i></b> and <b><i>Enlarged Photos</i></b> do not have a footer with the menu links.<br><br>You return to the previous page by clicking the <img src="pictures/backbutton.gif" alt=black> button in the top left corner of the browser window.</p><p align=center>The pages of the site are:<br><a href="index.html">Welcome</a><br><a href="history.html">History</a><br><a href="goodenoughs.html">Goodenoughs</a><br><a href="colliers.html">Colliers</a><br><a href="photos.html">Photos</a><br><a href="familytrees.html">Family Trees</a><br><a href="recipes.html">Recipes</a><br><a href="ceilidh.html">Ceilidh</a><br><a href="fathersday.html">Fathers' Day</a><br><a href="christmas.html">Christmas</a><br><a href="jokes.html">Jokes</a><br><a href="inmemory.html">In Memory</a></p></body></html>
edit: fixed omitted closing code tag and made it codebox due to length of post - skemcin
-
CSS
in HTML/XHTML
I created my first CSS, but the index.html page will not show the backgroung gif nor the alt: black. Tidy will not validate my .css Any help would be appreciated.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3org/TR/html4/loose.dtd"><html><head><!My Stylesheet><style type="text/css">body {background-image: pictures/blackmarble3.giffont-family: verdana, helvetica, arial, sans-serif;color: #FFFFCClink: #33CCFF VLINK: #FF6666;margin: 0em 2em 0em 2em;}h1,h2,h3, h4,{text-align: center;font-family: Georgia, "Times New Roman", Times, serif;}</style></head></html>
-
A newbie to coding. I have done some tuts and have created about 7 pages. The pages contain mostly text, and links to the other pages. There is one page with thumbnail images linking to enlarged photos.I want to create a family tree with the parents at the top. The children will be underneath a horizontal line with vertical lines leading to each child and the spouse side-by-side, and another horizontal line with vertical lines leading to the grandchildren. There will be spaces between the children along the line, and I may need to have longer vertical lines for adjacent children to fit the grandchildren on the page without the need to scroll. One set of parents has 4 children and 7 grandchildren.My first idea is to use the <pre> tags and set it up like I did on my wordprocessor.Any suggestions would be gratiously appreciated.Bill
Family Trees
in HTML/XHTML
Posted
I posted a reply, but it did not seem to take. I hope this is not a duplicate.