I am having a very odd problem with a css file i'm using. I have a body style in my .css file that looks like this: body{ padding-left: 11em; font-family: segoe script, "Times New Roman", Times, serif; font-size: 150%; color: #AFEAAA; background-color: #51A5BA } As you can see I have a left padding in the entire page. But I have an address tag at the bottom of all of my pages that I do not want to inherit this 11em. So at first I made a new section in my css file, just for the address tag: address { padding-left:0em; font-size: 13px; } This doesn't work for some reason. At first I thought that it wasn't working because I had screwed up this entire address block. But thats not true because I can change the font size and the change works. So it is linking correctly to the right tag, but the 0em will not override the body section. So I tried to do in inline, with some !important tag that I found online, and this didn't work either. <address style="padding-left:0px !important;">By Me</address> I hope that I have explained this well enough. Does anyone have any idea why this wouldn't work? Any help is appreciated. Wes
That doesn't seem to work either. I've also tried some different values other than 0 as well. I've tried 4, 10, 100, etc. Nothing seems to work in this line. Thanks for the suggestion though, any others?
Take out the !important part and try it. I think if you style it in the html (without the !important thing) it will override the style sheet, at least in FF. Take care. If that doesn't work, try moving the address above the body in the stylesheet (just a guess).
You can also try creating a seperate id or class for this like #addressbott{padding-left:0em} <address id="addressbott">Whatever</address>
I already took out the !important attribute, since I have never heard of it, plus it didn't work, haha. I also tried to put the address tag above the body in the stylesheet, and I've tried to make an "in file" style in the header, just for that address tag, and none of that works. It's so weird! Thanks so much though for the suggestion!
I tried that just now. I made it <address id="myaddress">, and made the css file the same. Still doesn't work. This is just too weird, it should be a simple thing. I also wanted to note that I've been getting the same thing in not only FF but also IE.
When you refresh the page, try hitting ctrl+F5, that should force a fresh cache of the stylesheet, you might be getting the same one in your browser everytime.
I ended up fixing this. I went a head and remodeled my whole css file. And I ended up using a combination of: text-align: center; margin-left: auto; margin-right: auto; And that seemed to help it. I needed to clean up my code anyways. Thanks so much guys for your help.