Click here to Skip to main content
15,887,936 members
Home / Discussions / Web Development
   

Web Development

 
QuestionThe namespace attribute cannot have empty string as its value(WebService ASP.NETC#) Pin
vinayh11-Jun-12 21:46
vinayh11-Jun-12 21:46 
AnswerRe: The namespace attribute cannot have empty string as its value(WebService ASP.NETC#) Pin
Sandeep Mewara11-Jun-12 23:14
mveSandeep Mewara11-Jun-12 23:14 
Questionbeginner URL rewrite question Pin
Jassim Rahma10-Jun-12 4:54
Jassim Rahma10-Jun-12 4:54 
AnswerRe: beginner URL rewrite question Pin
Sandeep Mewara11-Jun-12 23:10
mveSandeep Mewara11-Jun-12 23:10 
SuggestionRe: beginner URL rewrite question Pin
Naveen_1439-Aug-12 20:10
Naveen_1439-Aug-12 20:10 
Questioncrystal tool problem Pin
gopalmahadak9-Jun-12 17:38
gopalmahadak9-Jun-12 17:38 
AnswerRe: crystal tool problem Pin
Sandeep Mewara9-Jun-12 20:07
mveSandeep Mewara9-Jun-12 20:07 
QuestionDifferent text-align for columns in a table Pin
M-Badger8-Jun-12 10:35
M-Badger8-Jun-12 10:35 
I'm trying to create a table where the left 3 columns have text-align: left and the remaining columns have text-align: center. I would like to do it without setting a class on every td.

I know I can't apply text-align to colgroup or col but I've been trying to use those tags to apply a style to the th and td in those colgroup's. E.g.

CSS
#content table colgroup.holeinfo td {text-align: left}


But that doesn't work and I'm a bit stuck without resorting to:

CSS
<td class="holeinfo">


I'm not keen on heading that way since that would seem tedious and inefficient. And it feels like there ought to be a better way to do it!

xhtml 1.0 strict / css 2.1
I set up the base table styles as follows:

CSS
#content table {
    /* fix base table appearance */
	width: 100%;
	border: 2px solid #000;
	border-collapse: collapse;
	margin-bottom: 30px;
}

#content table td, #content table th {
    /* fix standard cell settings in tables */
	padding: 2px;
	border: 1px solid #000;
	margin-bottom: 3px;
	text-align: center;
    background: #383838;
}


Then the table looks like this:

HTML
<table>
    <caption>Morning</caption>
    <colgroup class="holeinfo" span="3"></colgroup>
    <colgroup class="scoreinfo" span="6"></colgroup>
    <thead>
        <tr>
            <th scope="col">Hole</th>
            <th scope="col">Par</th>
            <th scope="col">SI</th>
            <th scope="col">Gross Score</th>
            <th scope="col">Gross Points</th>
            <th scope="col">Net Score</th>
            <th scope="col">Net Points</th>
            <th scope="col">Yellow Ball</th>
            <th scope="col">Yellow Ball Points</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td>-</td><td>36</td><td>-</td><td>45 (+9)</td><td>12</td><td>37 (+1)</td><td>18</td><td>3</td><td>26</td>
        </tr>
    </tfoot>
    <tbody>
        <tr>
            <td>1</td><td>4</td><td>9</td><td class="bogey">5</td><td>1</td><td class="par">4</td><td>2</td><td>Y</td><td>4</td>
        </tr>
        <tr>
            <td>2</td><td>4</td><td>11</td><td class="dblbogey">6</td><td>-</td><td class="bogey">5</td><td>1</td><td>N</td><td>1</td>
        </tr>
    </tbody>
</table>


Thanks,
Mike
AnswerRe: Different text-align for columns in a table Pin
User 17164928-Jun-12 11:34
professionalUser 17164928-Jun-12 11:34 
GeneralRe: Different text-align for columns in a table Pin
M-Badger8-Jun-12 12:45
M-Badger8-Jun-12 12:45 
GeneralRe: Different text-align for columns in a table Pin
M-Badger8-Jun-12 12:52
M-Badger8-Jun-12 12:52 
GeneralRe: Different text-align for columns in a table Pin
User 17164928-Jun-12 13:27
professionalUser 17164928-Jun-12 13:27 
AnswerRe: Different text-align for columns in a table Pin
vvashishta18-Jun-12 20:36
vvashishta18-Jun-12 20:36 
Questionwhat are hidden links?? Pin
johnkennedy14-Jun-12 2:49
johnkennedy14-Jun-12 2:49 
AnswerRe: what are hidden links?? Pin
jfriedman4-Jun-12 2:56
jfriedman4-Jun-12 2:56 
AnswerRe: what are hidden links?? Pin
mccurdy4-Jun-12 21:41
mccurdy4-Jun-12 21:41 
AnswerRe: what are hidden links?? Pin
Gerben Jongerius6-Jun-12 22:36
Gerben Jongerius6-Jun-12 22:36 
AnswerRe: what are hidden links?? Pin
vvashishta18-Jun-12 20:38
vvashishta18-Jun-12 20:38 
QuestionForm using AJAX / jQuery to set session with dropdown menu Pin
cde1113-Jun-12 11:28
cde1113-Jun-12 11:28 
Questionweb site contet most recent view Pin
amanpavanker2-Jun-12 16:37
amanpavanker2-Jun-12 16:37 
QuestionIs aspx still useful face to HTML5 and Javascript? Pin
Bastien Vandamme31-May-12 23:10
Bastien Vandamme31-May-12 23:10 
AnswerRe: Is aspx still useful face to HTML5 and Javascript? Pin
Eddy Vluggen6-Jun-12 22:51
professionalEddy Vluggen6-Jun-12 22:51 
GeneralMessage Closed Pin
29-May-12 16:07
SophiaGreen29-May-12 16:07 
AnswerRe: How to make your support service efficiently? Pin
Eddy Vluggen6-Jun-12 22:49
professionalEddy Vluggen6-Jun-12 22:49 
QuestionExample for a desktop app developed with HTML5 Pin
amit123429-May-12 15:34
amit123429-May-12 15:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.