Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 27th, 2005, 03:25 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
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.
  #2 (permalink)  
Old March 27th, 2005, 08:50 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:26 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.