hi, i'm having a minor issue, well major issue. i have both div's side by side and would like them to appear side by side, however, it seems that they always add an extra line break. for example: <div>hello</div><div style="font-weight: bold;">there</div> Code (markup): I would like it to look like: hello [b]there[/b] Code (markup): however, it always looks like: hello [b]there[/b] Code (markup): I hope i've made myself clear, and if anyone could direct me how to address this issue, i'd be more than happy to give some rep. thanks
mm, not quite the answer i was looking for. is there a better alternative? because i'm trying to create a menu which have bordered boxes around them and there are multiple items. kind of like: <div id="menu">Home</div><div id="menu">About Us</div><div id="menu">Contact</div> Code (markup):
If you have to have DIVs, multiple DIVs that are supposed to line up on one line, they must all have "float: <left|right>" in the style. This may require whatever is beneath these DIVs to have the "clear: both" property. The only other alternative is using SPAN as tgo said.
That is a completely improper use of the div element. The purpose of the markup is to label each part of the document for what it is. In the case of a menu, it is by definition, a list. Get your markup correct, and we'll be better able to deal with the presentation. cheers, gary
As simple as the code below: <div style="display:inline">Hello</div> <div style="display:inline">There</div> Code (markup):