I have a div, fixed width, margin:0 auto, so it's centered against its parent div, bordered, very nice!
I have a <ul> within this div, however when i place margin: 0 auto; on the <ul> it still aligns hard left against the div.
are there some elements which you cannot apply certain attributes to because they have no effect.
Also why does a <p> tag expand its parent <div> tag?
The div (the pretty one explained above) has a fixed width, below the <ul> i'm trying to center is some text in a <p> tag, all this <p> has on it is text-align:center; but it is expanding its parent tag to the width of the containing div and NOT the fixed width I have given it.
why is the <p> tag doing this to it's parent div, shouldn't the <p> only have a width of it's containing parent div?
thanks 1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
I have a <ul> within this div, however when i place margin: 0 auto; on the <ul> it still aligns hard left against the div.
are there some elements which you cannot apply certain attributes to because they have no effect.
Also why does a <p> tag expand its parent <div> tag?
The div (the pretty one explained above) has a fixed width, below the <ul> i'm trying to center is some text in a <p> tag, all this <p> has on it is text-align:center; but it is expanding its parent tag to the width of the containing div and NOT the fixed width I have given it.
why is the <p> tag doing this to it's parent div, shouldn't the <p> only have a width of it's containing parent div?
thanks 1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.