Jump to content
xisto Community
Sign in to follow this  
BooZker

Problem With Css And Div Tag It is not aligned right

Recommended Posts

Can anyone help me with the site? My problem is i can't get the DIV box inside my main outline box. Here is my example of what my problem is (its the attachment). The side bar which is bolded is what i want and where i want. I can't get it there however. Here is my CSS:

#sidebar { 		 width: 140px;	border-style: solid solid solid solid;	border-color: #94AA74;	border-size: 1px;	border-width: 1px;	margin: 10px;	float: right;			 }

Is this right? When i take out the float: right it stays inside the main box that holds all the DIV boxes, but once i put a float: right it does not stay within the main box. Why is this? I know CSS pretty well as well as HTML, but i can't figure this out. Any help?
Edited by BooZker (see edit history)

Share this post


Link to post
Share on other sites

It would help if you could add a link or somewhere where we can see the page and the div in action. I entered your site and I didnt see any side bar.

Share this post


Link to post
Share on other sites

Yeah and the fact that the file is a php file, unless we through the files onto our own server to run, we wont be able to see what you mean. Either upload it to your Xisto site or post a screen shot so we can see it. I would check the float element and or add a z-index element to your css to make sure the box you want on top has the highest z-value.

Share this post


Link to post
Share on other sites

OK i fixed it. I just had to move it between these other DIV tags. It was just misplaced.

Share this post


Link to post
Share on other sites

Can anyone help me with the site? My problem is i can't get the DIV box inside my main outline box. Here is my example of what my problem is (its the attachment). The side bar which is bolded is what i want and where i want. I can't get it there however. Here is my CSS:

#sidebar { 		 width: 140px;	border-style: solid solid solid solid;	border-color: #94AA74;	border-size: 1px;	border-width: 1px;	margin: 10px;	float: right;			 }

Is this right? When i take out the float: right it stays inside the main box that holds all the DIV boxes, but once i put a float: right it does not stay within the main box. Why is this? I know CSS pretty well as well as HTML, but i can't figure this out. Any help?


when use float in box, remember to put a clear element at the last of the outline box. otherwise the above float will not be enclosed but the outline box.

example:

<div id="outbox">
  <div id="div1">....</div>
  <div id="div2">....</div>
  <br style="clear:both;" />
</div>


Notice from truefusion:
You must place coding into CODE bbcode. Second verbal warning.

Share this post


Link to post
Share on other sites

oh... Thanks! let me try it out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.