I'm using a tables on my web page. Having margin-left and margin-top seem to eliminate the spaces, but margin-right doesn't seem to work. What am I missing here?
| SitePoint Sponsor |
I'm using a tables on my web page. Having margin-left and margin-top seem to eliminate the spaces, but margin-right doesn't seem to work. What am I missing here?





Since you seem to be getting rid of all margins try
margin: 0;
(
Maelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.


Setting a right margin either through "margin-right" or "margin" doesn't seem to be well-supported. Although if you tried it and it didn't work, then you've already determined that.![]()
Great...





Which browsers after ie5.5 and netscape 6 and opera don't support it. I haven;t had any problems with those?Originally posted by OneChance
Setting a right margin either through "margin-right" or "margin" doesn't seem to be well-supported. Although if you tried it and it didn't work, then you've already determined that.![]()
Maelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.


And you probably won't, but unfortunately not everyone has the very latest browsers. A lot of people are still using NS 4.x. Hell, I still get hits from IE 3.x users.Originally posted by Maelstrom
Which browsers after ie5.5 and netscape 6 and opera don't support it. I haven;t had any problems with those?





well in that case they don't support any CSS.Originally posted by OneChance
And you probably won't, but unfortunately not everyone has the very latest browsers. A lot of people are still using NS 4.x. Hell, I still get hits from IE 3.x users....(except ns4.x)
Maelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.


Actually, IE 3.x supports font-weight: bold.![]()





Really it supports one tag. Thats too funny. I have never bothered to code for ie4. and less. So I really wouldn't knowOriginally posted by OneChance
Actually, IE 3.x supports font-weight: bold.![]()
![]()
Maelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.
Hey, guys, I'm currently using the latest browsers, no doubt! Heck, I even have the latest OS (WinXP) and RH Linux 7.2 (although still a newbie)!
The margin: 0 or margin-right: 0 in CSS doesn't seem to work. This is what I got so far:
body { background-color: #ffffff;
font-family: Verdana, Arial, sans-serif;
color: #989898;
font-size: 10pt;
margin: 0 }




I doubt this will fix the problem but you never now.
Specify a unit for the margin: margin 0px;
I tried that, isotope, but it still doesn't work. Thanks for trying, though.




Oh well, worth a shot.
Can you post the code in question?
I'm sorry, but what do you mean by "posting the code in question"? Pardon my stupidity.![]()


Can you give us a link to the page you're having a problem with?
I didn't upload it yet. I'm just going to ignore what I've been trying to accomplish for now and move on.![]()





You don't have to specify units when the value is 0, but I'm thinking that his problem has something to do with the doctype he's using...Originally posted by isotope235
Specify a unit for the margin: margin 0px;





If I understand what he is doing, why doesn't he just add these to the Body?
Code:<body bgcolor="#000000" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" rightmargin="0" bottom="0">
Chuck
"Happiness doesn't find you, you find happiness" -- Unknown
www.chuckknows.com





That's the "old" HTML way of doing things. No doubt, margin:0; is better, but I want to figure out why it's not taking.![]()





Well shoot,
I don't want to be doing anything the "old" way, so when you figure it out could you post it
Thanks
Chuck
"Happiness doesn't find you, you find happiness" -- Unknown
www.chuckknows.com





I would like to know to. I use Margin:0 on every site and it works everytime.Originally posted by Chuckie
Well shoot,
I don't want to be doing anything the "old" way, so when you figure it out could you post it
Thanks
Chuck![]()
Maelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.




How exactly do you use your margin: 0 Maelstrom? Can you tell us how your CSS looks. Do you declare it in the BODY selector? Does it work in all browsers?
Denis Boudreau <C²/> - Web Standards & Accessibility
[+] ICQ number: 115649885 || Email: denis@cybercodeur.net
[+] Daily Weblog on Web standards and accessibility : CYBERcodeur.net





In response to everyone, the CSS "new" way to set no margin around the entire page would be like this:
You have to add the padding: 0 as well because of Opera. Opera will leave some padding around the page unless you do that, but Internet Explorer and Mozilla won't.Code:<style type="text/css"> <!-- body { margin: 0; padding: 0; } --> </style>





See colon. I didn't quite realize the Opera problem. But thats cause I don't have that browser to check with.Originally posted by cybercodeur
How exactly do you use your margin: 0 Maelstrom? Can you tell us how your CSS looks. Do you declare it in the BODY selector? Does it work in all browsers?
body {
margin: 0;
}
...Thats for the tip colon.
![]()
Maelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.





No problem.I actually only found that out recently when I was doing some testing in Opera.
Bookmarks