Need to know how to position text/tables/buttons
Posted: Dec 25, 06, 16:53 Mythic Fr0st
Joined: 14 Dec 2006
Location: right now, on a chair
Ok, previously I was using
:: Code ::<div style="position: absolute; top: 300px; left: 300px;'>
my programming friend said it was bad to use 'absolute' unless desperate, and specially not to layout page... and caused problems
I've tried using css
:: Code ::
all my button stuff here and tables n so on
It works with text, not tables/buttons
Can someone help
I also have another problem
whenever I click my "attack" button
it somehow creates LARGE gaps between them all of em, I dont know why, i've revised my 1000 line code, gone through it atleast 60 times(file names hp) and then gone through indexg.php which includes it, when I had all the buttons in HP instead of indexg it worked fine, but then I couldnt include it in all my files
If anyone is interested in trying to help me -.- please pm me
posting it is useless, as I have in 5 other forums, for the past 8 days, with no 'helpful' response
~ Currently working getting my stuff on a site so I can show ppl the problem, but its christmas GRR hate Christmas -.-
Back to top
css questions are complex, and depend on many factors, not just the single items you are referring to.
css deals with the entire document, from top to bottom, and one element affects another, unless you pull elements out of the document flow, using things like position:absolute, float:left/right, position:fixed, and so on.
every css solution can create another css problem, so there is no absoolute answer ever to problems.
Your friend is not right about css and absolute postitioning, in fact, as long as it does not interfere with the rest of the document layout, position absolute is probably the very easiest thing to do in css, since once you position something absolutely, there it is, exactly where to told it to be, with almost zero variation browser to browser.
However, position:absolute requires understanding how css work in terms of positioning. Buy books, don't rely on bad half right half wrong online css tutorials that are in almost all cases grotesquely incomplete in terms of also letting you know the pitfalls and downsides of 'cute or cool css trick x or y'.
The best css book is O'Reilly press, Cascading StyleSheets: the definitive guide, make sure to get the latest edition.
In order to achieve correct positioning, you must determine what the container for the positioned item is. If you do not explicitly create a container for it, which is always a bad idea, the container is the <body> tag.
To explicitly create a container, you need to have something that contains the positioned element, say a div tag: <div style="position:relative;">... <positioned tag>...</div> have a position:relative declaration. This will force all children of that tag to position themselves relative to that tag, not to the overall page itself.
There are many ways to position things, if you use margins, you can position them relative to other elements in the layout, which you can't do with position:absolute.
YOU WILL NOT AND CANNOT LEARN CSS IN ONE DAY. OR TWO DAYS. It requires study and a great deal of practice.
You will not get any meaningful help online unless you demonstrate that you are willing to do this work. I certainly won't help someone until they have demonstrated that they are willing to do work on a problem beyond spending an hour or two trying to learn somethign that takes 1-2 years to actually learn.
This includes learning html, by the way. So when you say: when I click my 'attack' button, that has absolutely no meaning. Are you submitting a form? are you creating some button that links to the app, or activates something?
Obviously if you are not clear enough about how to ask the question, you will not receive a meaningful answer.
Get some books, do yourself a favor.
It's impossible to really know what you are trying to do, have you made some convoluted table using some wysiwyg editor, and now expect to be able to move it around even though it's part of your underlying page structure?
Impossible to say unfortunately, and this is why you have not received any answers, you have not actually asked any questions yet.
A code question means you know which piece of code is in question, you can post meaningful facts about the code in relation to both the css and the html, so that people reading your question can understand what you are trying to accomplish.
Making forms in css is not easy at all, if that's what you are trying to do, and I certainly won't make one for you for free until you show some ability to create code and ask questions that directly relate to that code. And most other forums are the same, you have to accept that you need to start learning, practicing working etc, and this doesn't mean posting to get people to do your code for you before you have any idea what that code is, it means work.
Good luck, and have fun, but stop being so ridiculously unrealistic about the time that is required to achieve a baseline competence in any of the areas you are asking about. This stuff takes time and work, and until you start to understand what that means you won't really get the kinds of answers you are looking for online, since most people online who know how to do what you are trying to do have already done that work, and will only happily help, for free, people who demonstrate that they really have tried already, and trying means spending the time to learn the basics, which you have not yet done.
Back to top
Posted: Dec 26, 06, 11:38 techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Location: East Coast, West Coast? I know it's one of them.
While now and again we get a newbie question that is interesting enough to actually spend time on here, in general I really do not want to encourage newbie material on these forums, unless, again, they are particularly interesting, or show some interesting bug or problem that was not commonly known.
This question definitely does not fall into that area, especially since the poster has been at this stuff for mere days, and that I'm sorry to say does not qualify as 'having done the required work'.
Css requires a lot of practice and playing around with, and of course also requires a fairly thorough understanding of the underlying html components which css works on. So if no html understanding is present, then talking about css is a waste of time.
Learning this stuff takes a lot of work, no matter what some stupid online tutorial might lead you to believe. If you do not understand all the basic html tags, then you cannot skip that stage and jump to css, it simply does not work that way.
The key here is your use of the word 'button', you would not use that term if you actually knew html, since buttons technically are most probably not what you are referring to. My guess is that you are talking about a submit form button, but it could be a radio button, or some graphic, as noted. And of course, it matters what it is, since css is different for inline and block level elements, etc.
Anyway, I think I'll lock this thread.
Back to top
All times are GMT - 8 Hours