View Full Version : "align" center in XHTML...?
johnish
07-25-2008, 04:37 PM
im aware that the fuction align in XHTML 1.0 is not valid,
and im wondering now else i can move the whole div, not just the text
and also know that a margin of 50% wont work in IE
i need the whole div to be centered...?
jcdevelopment
07-25-2008, 04:39 PM
.div {
width:/*set a width(you need one)*/
height:..;
margin:0 auto;
border:..;
}
That is a basic way of styling one. the code
margin:0 auto;
is what centers the div.
johnish
07-25-2008, 04:41 PM
can the hight be set as auto?
jcdevelopment
07-25-2008, 04:42 PM
if you would like, the width is really the important part.
johnish
07-25-2008, 04:44 PM
okay sweet, thanks alot =)
jcdevelopment
07-25-2008, 04:46 PM
No problem. Let us know if there are any other problems.
johnish
07-25-2008, 05:00 PM
sorry to bother you again
but im trying to change the link colors in different divs
i need another color for the headder links to the regular page links??
a.nav:link
something like that... nav is the div and its an id
abduraooft
07-25-2008, 05:01 PM
div#nav a:link{
} Or simply
#nav a:link{
}
see http://htmldog.com/guides/cssintermediate/classid/
jcdevelopment
07-25-2008, 05:02 PM
abduraooft is right, just call it through another selector so its different from the standard link.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.