p2p.wrox.com 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 27th, 2005, 03:25 AM
Registered User
Points: 14, Level: 1
Points: 14, Level: 1 Points: 14, Level: 1 Points: 14, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old March 27th, 2005, 08:50 AM
richard.york's Avatar
Wrox Author
Points: 5,386, Level: 31
Points: 5,386, Level: 31 Points: 5,386, Level: 31 Points: 5,386, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,697
Thanks: 0
Thanked 1 Time in 1 Post
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 08:06 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 08:01 AM
<A><DIV><TABLE></DIV></A> anshul HTML Code Clinic 2 July 17th, 2004 03:17 PM
functions in <HEAD> vs <BODY> John K. King Javascript 4 April 5th, 2004 09:53 AM



All times are GMT -4. The time now is 04:40 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc