|
| |
|
|
Starhugger
Posts: 521 Joined: 4/12/2005 Status: offline
|
Different results for div align - 4/15/2006 2:33:46
Can someone help me understand why I'm getting different results with this, please? When I put <div align="center"> right in the body, the div centers. When I put the following in an external CSS file, it won't center: #shell { align: center; } Then in the body I put <div id="shell">, but it doesn't work. I haven't used it more than once in a file either. I've also tried saying "text-align: center" in the external CSS, but nope. I think I've also tried defining it as a class (e.g., ".shell" and then saying <div class="shell"> ) but that doesn't make it work either. It's just puzzling to me because it seems like it should do the same thing. Yet, it only seems to work if I put the centering attribute directly in-line in the div command. Anyone know why it works this way? Am I stating it wrong in the external CSS? Starhugger
|
|
|
|
Tailslide
Posts: 6121 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Different results for div align - 4/15/2006 3:57:26
align="center" is deprecated so that might be what's causing the problems when you try to put it in a stylesheet. Try #shell {text-align:center;} which will work for inline stuff such as text or images.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|