hello guys, i need some helps! i want to create menus... menu have left, center and right... but i can't align the div... here i put the files... http://softgroups.com/temp/q/
You can float first div to left and the last div to right. Or you can use display:inline; BTW where is the <html> tag ? Also you need the <head> tag and <body> tag. http://www.w3schools.com/css http://w3schools.com/html/default.asp
Especiallly while you are learning it always good to remark your divs to make it easy to follow and for other to help you easier. Example: <div class=msgmenu1> <!-- open msgmenu1 --> </div> <!-- close msgmenu1 --> The remarks are non displaying. I think you got the correct answer above.
I removed it... because it's just a question , and wanted to code to not look big because i need responses.... display:inline won't work ... float:left for all divs can work ... then have those 3divs in a big div...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>COMPOSE</title> <style type="text/css"> .msgmenu1, .msgmenu2, .msgmenu3{ float: left; } .msgmenu1 { width:13px; height:28px; background-image:url('images/msgmenu1.gif'); } .msgmenu2 { height:28px; width:250px; background-image:url('images/msgmenu2.gif'); } .msgmenu3 { width:17px; height:28px; background-image:url('images/msgmenu3.gif'); } .clear { clear:both; } </style> </head> <body> <div class="compose"> <div class="msgmenu"> <div class="msgmenu1"></div> <div class="msgmenu2">COMPOSE</div> <div class="msgmenu3"></div> <div class="clear"/> </div> </div> </body> </html> HTML: