Log in

View Full Version : I am learning css-can I do more



ajfmrf
04-24-2011, 04:22 AM
To improve my use of css on this page.

http://web-user.net/1test/acsstest.html

I have a few questions listed on the page.

Here is the pages code:



<html>
<head>
<title>Table test-how to correctly use css and markup for a table with images and text</title>


<style type="text/css">
table,td
{
border: 1px solid black;
border-collapse:collapse;
}
table
{
width:700px;
}
td
{
width:100px;
height:30px;
text-align:center;
}
div{
align:center;
}

#wrapper{
width:500px;
position:absolute;
left:50%;
margin-left:-250px;
}
</style>
</head>

<body>
<br><br>
<table align="center">

<tr>
<td>&nbsp;&nbsp;<img src="http://web-user.net/buttons/gray1.jpg" align="left"></td>
<td><font color="blue" size="1">This is an example of two different buttons.</font></td>

<td><img src="http://web-user.net/buttons/ovalgray2.gif" align="right">&nbsp;&nbsp;</td>
</tr>
</table>



<br><Br>



<div id="wrapper"style=”text-align: justify; text-justify: newspaper”>

Now for the Questions:
<ol>
<li>Can the width of the '<td>' be made
independantly/different by using css to configure it?</li>

<li>Can units of px help precisely place an image?</li>
<li>I know there is more that can be done but can
some one help me learn more?</li>
<li>I know classes can be used all over but id's are for
one time use( I think -lol )
I get them confused as far as<br> the # and the . goes</li>
</ol>

</div>
</body>
</html>



Thanks Bud

ETpro
04-27-2011, 06:54 AM
"Can the width of the <td> be made independantly/different by using css to configure it?"

You have each defined as 100 pixels wide now, but there are 3 cells in a table specified at 700 pixels. You can't have both. The math doesn't add up. You could specify an ID for each cell and style each with a defined width. If you do that, there is no need to specify the table width. But if you are determined to call out both, at least the math has to add up. :-)

"Can units of px help precisely place an image?"

I am not sure what you mean by that. Can you define what you wish to do?

"I know there is more that can be done but can some one help me learn more?"

I'm afraid Forums don't work that way, and that's why it took you so long to get an answer. To study a topic, use tutorials. Forums are for specific questions you have tried to find answers to and been unable to solve through searches of tutorials and existing forums.

"I know classes can be used all over but id's are for one time use( I think -lol ) I get them confused as far as the # and the . goes"

I feel your pain, brother (ir sister). But it's the dues we all have to pay. Lots of terms are unique to programming, and taking it in in English when that isn't your native tongue must be particularly tough. Just hang in there.

ajfmrf
04-27-2011, 05:09 PM
I am only asking for help to correct the way I am writing the css code.All posts here are either asking for help or answering these questions.

I guess I am asking more then I should be

enough said


bud

djr33
04-27-2011, 07:57 PM
You're right about the classes and IDs.