0

i m new to coding a style sheet by hand.i did a website with positioning all the elements by adjusting their margins,some settles in the desired place automatically.now , i use
absolute positioning, but for this i need to arrange each and every element . i do not know
what is the best practice for positioning a element ? help me out....

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by Lorel
0

Absolute positioning can be a real headache, particulary with resizing the browser window. You should be able to use position: relative to position child elements within their parent with few problems. You will still get some movement between the browsers though.
Are you using a CSS browser reset to clear out all margins and paddings before you begin? That can help.

0

You can center a web page by applying "margin:auto 0 auto 0;" to the main page div, and then float other content within it. If you have two or more boxes across the page float each one to the left and apply left or right margins to each to position them exactly where you want them. You have to make sure that the box width plus each margin is a little bit less than the page or the last one will wrap to the next row.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.