What positioning tool should i use in css? Right now I'm using position:absolute. In some browsers it's not working. What should I use? What's the best thing to use to position stuff on a page using css?

  • Please link to your page or we'll have to close this question as it's too vague, thanks. Matthew Brindley over 7 years ago
  • im not asking about my page. how is this too vague? all im asking is what is the best positioning tool. i dont have to put a page. its not specifically about my page. canyonchase1 over 7 years ago
  • The question is too big to get a sensible answer, it's like asking "how should I build my house?" or "what colour clothes would suit me best?" Tony Crockford over 7 years ago
  • Hi canyonchase1, I'm afraid that Tony's right, without either a page to find the problem, or an accurate description of the problem, the question isn't answerable. Your other questions were more specific and could be answered by Doctype users. Matthew Brindley over 7 years ago

2 answers

2
points

learn about document flow and html structure first: http://www.opera.com/company/education/curriculum/

All the answers, to all the questions you keep asking can be found in the information at the end of the link above.

take the time to read it all.

CSS styles elements on the page, position is based on document flow. You can take elements out of the flow with position:absolute, you can nudge them within the flow with position: relative and you can slide elements into new positions by floating them.

all positioning is affected by browser rendering differences.

you can't learn CSS design by asking generalised questions, you need to follow some tutorials and experiment until you properly grasp how html works and then how CSS can change the rendering of that html in the browsers.

some how to design with css tutorials here: http://www.bestpsdtohtml.com/20-best-psd-to-xhtml-css-tutorials/

and a very simple build a site with css tutorial here: http://leftjustified.net/site-in-an-hour/

Answered over 7 years ago by Tony Crockford
0
points

You are correct that absolute positioning - unless it is around the edges of the page - leads to very fragile designs. This is because the viewer has considerable control over aspects of page layout, via stylesheet overrides, minimum font sizes etc.

Otherwise, how to position really depends upon what you are positioning: Positioning content into columns is most often done with floats and negative margins. Within a column, individual items are best left in the flow with whatever is preceding and following it.

I have occasionally encountered visual designs which would have been very easy to lay out as a table but which are very hard to reproduce with css, thanks to the fact that display:table was so late to be supported by Internet Explorer.

Answered over 7 years ago by Richard Grevers