Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
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:

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


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?
Posted
Updated 7-Jan-15 9:35am
v2
Comments
PIEBALDconsult 7-Jan-15 15:18pm    
Then stop reposting it. You need to add detail, maybe some code.
Member 11359396 7-Jan-15 15:35pm    
at first i dont know it can be edited, so i repost it after i edited and delete a previous question, then i found my edited question closed.

1 solution

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

Change the width percentage as per requirement.
Example
HTML
<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 :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900