PDA

View Full Version : Why is text-align inherited ?


Rob_Che
06-20-2008, 08:32 AM
I'm having trouble centering content in a div.
I want the date divs to be centered in the "post-date" div.

When I FireBug it - it tells me that that "text-align: left;" is inherited from the Wrapper... Why?

I have tried over-riding it with "text-align: centre;" but it still reads the wrapper element... Why?

Here's the blog: http://blog.doncasterlivemag.co.uk

Cheers all....
Rob

Corrosive
06-20-2008, 11:21 AM
I'm having trouble centering content in a div.
I want the date divs to be centered in the "post-date" div.

When I FireBug it - it tells me that that "text-align: left;" is inherited from the Wrapper... Why?

I have tried over-riding it with "text-align: centre;" but it still reads the wrapper element... Why?

Here's the blog: http://blog.doncasterlivemag.co.uk

Cheers all....
Rob

Hey Rob

This may be a dumb question but whay have you aligned text in your wrapper at all? I just set the wrapper as auto left, right margin, a set width and auto height. Maybe I am doing this wrong but it seems that styling text in the wrapper is a little pointless, no??

"Where’s our Avatars they’ll say… Weelll - I been busy!"

By the way, 'Where are our Avatars??!' ;-)

Rob_Che
06-20-2008, 12:13 PM
Domedia has the Avatars - don't you worry ! haha...

I'll take it out and see what it does to the site...
I think it's always been in there... probably never changed it in any of the sites :blush:

Rob - ;)

Corrosive
06-20-2008, 12:22 PM
Domedia has the Avatars - don't you worry ! haha...

I'll take it out and see what it does to the site...
I think it's always been in there... probably never changed it in any of the sites :blush:

Rob - ;)

Fair enough. Yeah, I'd suggest taking it out and seeing what happens. Try and keep CSS as 'clean' as possible. No point in styling stuff that just isn't there. Keep us posted with how you get on fella.

Noticed earlier I have become a silver member...does that make me a seargent??

Rob_Che
06-20-2008, 12:26 PM
HAHAHAHA! I'm SUCH a muppet.
I was spelling Center the English way (Centre) - D'oh !

Corrosive
06-20-2008, 12:42 PM
Ha, ha, nice one fella :lol:

Nothing wrong with British spelling...everyone else should follow our lead!

Still not sure why you've styled text in you wrapper mind you.

Corrosive
06-20-2008, 01:24 PM
Looks like you got it sorted then. :wink: