Wrox Programmer Forums
|
BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design by Richard York; ISBN: 9780764576423
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 27th, 2005, 03:25 AM
Registered User
 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default <style> tags in a <body> vs. <div>

I have been creating a website, solely using CSS and HTML. This particular site revolves aroung a 225px. image on the left side of the screen with all of the content to the right of that picture.

The problem that I am having is that when I put <style> tags into a <div>, it works in Netscape, Opera, and Safari; but not IExplorer. I was given the advice to remove this tag and put it in the <body> tag. When I did this, nothing recongized the 225px image, not even Netscape.

This is a very importand quiestion that my ENTIRE site revolves around and works with all browsers except the widely-used Internet Explorer. Cen you please help me with this problem?

The exact advice given to me was remove:
div.top {
     position: absolute;
     top: 0;
     bottom: 0;
     left: 0;
     right: 0;
     backgroung-image: url('nav.jpg');
     background-repeat: repeat-y;
 }

and replace that with:

body {
     background-image: url('nav.jpg');
     background-repeat: repeat-y;
 }

The problem with the <body> tag is that NO BROWSER recognizes it.
 
Old March 27th, 2005, 08:50 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Hi, I already answered your question the other day.

You cannot have <style> tags in external style sheets! There can be no markup in external style sheets, only CSS rules. That's why you couldn't get any browser to see the background image on the <body> element, they are suffering from errors from the presence of bad syntax, namely markup where there isn't supposed to be any. I don't know how I can explain it more clearly.



Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design





Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression to remove <table> </table> tags mathalete CSS Cascading Style Sheets 2 January 23rd, 2006 01:59 PM
Response.Write output is of <body></body> yoord BOOK: Beginning ASP.NET 1.0 0 October 13th, 2004 07:06 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM
<A><DIV><TABLE></DIV></A> anshul HTML Code Clinic 2 July 17th, 2004 02:17 PM
functions in <HEAD> vs <BODY> John K. King Javascript 4 April 5th, 2004 08:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.