css - Center-align a div next to a float -
i trying center-align image inside of div contained in 940px width page.
<div class="header"> <img class="logo" href="x"/> <ul class="toplinks"> <li>blah</li> </ul> </div> i have "toplinks" ul floated right. center logo class relative entire 940px page. way able center logo use html attribute 'align="center"' (i know deprecated), centered relative floated toplinks , not entire page.
i trying image in center of 940px container while having toplinks floated directly right of it.
css try:
.header img.logo { margin:auto; clear:both; } .ul_wrapper { width:100%; height:auto; position:absolute; } .ul_wrapper ul.toplinks { float:right; } html try:
<div class="header"> <img class="logo" src="x" /> <div class="ul_wrapper"> <ul class="toplinks"> <li>blah</li> </ul> </div> </div>
Comments
Post a Comment