Click here to Skip to main content
15,911,035 members
Home / Discussions / Web Development
   

Web Development

 
QuestionHelp Vadim Segal To Create Contact Us Form For The Website Pin
VadimSegal17-Jun-12 21:40
VadimSegal17-Jun-12 21:40 
QuestionA .Net ligth-weight REST server framework Pin
CodingBruce16-Jun-12 6:08
CodingBruce16-Jun-12 6:08 
QuestionAttendance system in asp.net Pin
Ajit001016-Jun-12 1:45
Ajit001016-Jun-12 1:45 
AnswerRe: Attendance system in asp.net Pin
Sandeep Mewara16-Jun-12 3:09
mveSandeep Mewara16-Jun-12 3:09 
Questionredirect based on language Pin
Jassim Rahma14-Jun-12 5:10
Jassim Rahma14-Jun-12 5:10 
AnswerRe: redirect based on language Pin
Gerben Jongerius14-Jun-12 20:29
Gerben Jongerius14-Jun-12 20:29 
Questiontab in CodeIgniter Pin
Susy Nainggolan13-Jun-12 21:44
Susy Nainggolan13-Jun-12 21:44 
QuestionWeb Devlopment Pin
Okezie Victor12-Jun-12 0:27
Okezie Victor12-Jun-12 0:27 
AnswerRe: Web Devlopment Pin
Richard MacCutchan12-Jun-12 2:17
mveRichard MacCutchan12-Jun-12 2:17 
GeneralRe: Web Devlopment Pin
Okezie Victor12-Jun-12 18:21
Okezie Victor12-Jun-12 18:21 
GeneralRe: Web Devlopment Pin
Richard MacCutchan12-Jun-12 21:47
mveRichard MacCutchan12-Jun-12 21:47 
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 

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.