Reply
CSS Question
Old 05-31-2005, 07:52 AM CSS Question
JohnJ's Avatar
Extreme Talker

Posts: 196
Location: Raleigh, NC
If I add the following to <body> I can align my page to occupy the full screen in IE, Netscape, Opera and Firefox - - leftmargin="0" topmargin="0 " rightmargin="0"

However

If I add the following in CSS it does not work.
html, body { margin: 0; padding: 0; }

What am I missing?

Thanks JJ
__________________
JohnJ
http://www.webimagesinc.com
WebImages Inc. - Raleigh NC
JohnJ is offline
Reply With Quote
View Public Profile Visit JohnJ's homepage!
 
When You Register, These Ads Go Away!
Old 05-31-2005, 09:31 AM
numbenator's Avatar
Ultra Talker

Posts: 411
Location: London
you must use px

html, body { margin: 0px; padding: 0px; }

I think anyway.

just tested and works fine with or without px :
(IE and firefox)
code used :

<style>

html, body { margin: 0; padding: 0; }


</style>
<body>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
__________________
www.mastech-solutions.com

Last edited by numbenator : 05-31-2005 at 09:36 AM.
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Old 06-01-2005, 07:55 AM Using Style Sheet
JohnJ's Avatar
Extreme Talker

Posts: 196
Location: Raleigh, NC
numbenator - Thanks for your response

Sorry - - I wasn't clear in my first question.

You are correct - - the code works correctly if used inline as you posted in your reply, however it does not work in an external stylesheet that is called in a link statement.

Any additional assistance would be appreciated.

JohnJ
__________________
JohnJ
http://www.webimagesinc.com
WebImages Inc. - Raleigh NC
JohnJ is offline
Reply With Quote
View Public Profile Visit JohnJ's homepage!
 
Old 06-01-2005, 02:20 PM
Experienced Talker

Posts: 46
JohnJ, the code numbenator posted should work inline or with a linked style sheet? Perhaps it's a caching issue that's making it appear not to. Try dumping your browser cache or add a ?qwert to the end of your URL to force a full refresh.

Example: www.YourDomain.com/page.html?qwert

HTH,
Scott Bannon
__________________
BanPro NET - stable & secure web services since 2000
scott bannon is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS Question
 

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12712 seconds with 12 queries