CSS is still fairly new to me. I have a div element and want to define a button element that would be placed right of the div element. However, I want to do this without modifying any of the styling of the div element. Is this possible? Edit: If yes, please show me an example :)
2 回答
0
您可以使用position:absolute该元素并使用right/left和top/ bottomcss 规则对齐它,这将使元素相对于整个网页(或最近的position:relative父级)对齐,但您要查找的通常是通过同时制作两个元素float:right/left或display:inline-block. 请注意,我的答案中的“/”表示您的选择,而不是实际的 css 指令。
于 2013-05-24T11:50:22.717 回答
0
简单添加
float:left
或者
float:right
样式它会正常工作并在一个和另一个之后显示。
于 2013-05-24T12:47:08.973 回答