如何重新定位侧边栏? [英] How to reposition sidebar?

查看:117
本文介绍了如何重新定位侧边栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我仍然是html代码的新手,而且我的侧边栏与内容放在同一行有问题。我使用免费的css模板。

我想要这样的侧边栏:*内容#sidebar



I'm still newbie for html code, and I have a problem with placing my sidebar in the same row with content. I use a free css template.
I want my sidebar like this: *content #sidebar

********** ####
********** ####
********** ####
********** ####
********** ####





但结果如下:





but it turns out like this:

**********
**********
**********
**********
**********
********** 
####
####
####





我已经在css中更改了保证金填充浮动 html代码,并且没有边框应用(如果它是必要的)但它不起作用。我不知道我改变了什么让它变成那样。我应该怎样做才能使我的补充工具栏走到右边?



I've done changed the Margin, Padding, and Floating html code in css, and there's no border applied (if it's neccesary) but it doesn't work. I have no idea what I've changed to make it turns out like that. What should I do to make my Sidebar go to the right side?

推荐答案

这应该可以完成你的工作 -

This should do your job-
<div style="width:25%;float:left;"></div>
<div style="width:75%;float:left;"></div>



根据要求更改宽度百分比。

示例


Change the width percentage as per requirement.
Example

<div style="width:25%;float:left;background-color:silver;height:100px;"></div>
<div style="width:75%;float:left;background-color:steelblue;height:100px;"></div>



它将如下所示


It will look like below












希望,这有帮助!

否则请告诉我:))


Hope, it helps !
Otherwise let me know :)


这篇关于如何重新定位侧边栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆