Introduce DataBase,Asp.net,JavaScript,Xml,Html,Css,Sql,Php,ASP.NET Controls,AJAX,Tools,HTML,CSS,JavaScript,Open Source Project,WPF,.Net Framework,Linq
Top Recommended Hosting

Set Table format using CSS

by the3factory 5/2/2008 9:20:00 PM
Question:

Guy's I am very new to CSS. I barely now what it is.

As I understand it...

 CSS is a code that I can use for a repeating element. In this case I was to create a table to hold several hyperlinks

and I want to be able to keep the formating all the same with out keying in each time. I think this is what CSS is for.

However, I can't seem to find a simple example of this a 3 column 10 row table with a header a the top. I want to know

how to write the CSS and also how to call it up.

I assume I can give it the comands and then have my text and hyperlink properties embeded?

Not realy sure. Can anyone help me out here?


Answer1:

I am just trying to learn this stuff and here is what I got.

 

table.sample {
	border-width: 1px;
	border-spacing:0;
	border-style: solid;
	border-color:#669900;
	background-color:#f1f1f1;
	border-collapse: separate;
	background-color: white;
	font-size:8.0;	
}

 

Here is the code from my page

            <table class="sample" width="500" >
                <tr>
	            <th style="width: 167px" background="../Images/ticell.gif" align=center >Header</th>
	            <td style="width: 167px" background="../Images/ticell.gif" align=center >Header</td>
	            <td style="width: 167px" background="../Images/ticell.gif" align=center >Header</td>
                </tr>
                <tr>
                    <th style="width: 167px">
                    </th>
                    <td style="width: 167px">
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <th style="width: 167px">
                    </th>
                    <td style="width: 167px">
                    </td>
                    <td>
                    </td>
                </tr>
            </table>

 But what I get on the debugger is just the table properties that I have in the html?

What am I missing? In Design mode it appears to be reading the CSS. But one I hit the debugger it is gone.


Tags:

Related posts

Sign up for PayPal and start accepting credit card payments instantly.


Powered by BlogEngine.NET 1.2.0.0