Jonaslove195
New Member
For the following code, it renders the picture as follows
The effect I want is that the "Hello, user1" is aligned with the black box, and both of them are aligned to the right side of the grey box, how should I achieve this?\[code\]<html><head><style> #header { width: 100%; height: 81px; background: url(http://www5.picturepush.com/photo/a/12541848/img/Anonymous/header-bg.png) 0 0 repeat-x;}#header h1 { display: block; float: left; margin: 30px 0 0 35px; font-size: 18px; color: #6a6a6a;}#header #logo { display: block; float: left;}#header #userlog { width: 272px; height: 31px; background-color: #363636; border-radius: 2px; float: right; margin: 27px 26px 0 0;}#header #userlog a { font-size: 13px; float: left; color: #b7b7b7; margin-top: 6px;}#welcome_msg { color: #b7b7b7; float: right;} </style></head><body><div id="header"> <a id="logo" href="http://stackoverflow.com/questions/15715483/dashboard.php"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/archive/c/c1/20070624012131!Fuji_apple.jpg/120px-Fuji_apple.jpg" alt="" /></a> <div class="welcome_msg" id="welcome_msg">hello, user1</div> <h1> My Portal </h1> <div id="userlog"> <a href="http://stackoverflow.com/questions/15715483/#" style="margin-left:25px;text-decoration:underline;">Contact Support</a> <a href="http://stackoverflow.com/questions/15715483/#" style="margin-left:20px;">FAQ</a> <a href="http://stackoverflow.com/questions/index.php" style="margin-left:25px;">logout</a> </div></div></body></html>\[/code\]