PCAXE forum

Go Back   PCAXE forum > SOFTVER > Aplikativni softver

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd January 2012, 11:30   #1
ThePocetnik
Redakcija
ThePocetnik's PC
 
ThePocetnik's Avatar
 
Join Date: 30th March 2009
Location: Beograd, Srbija
Posts: 1,722
Problem sa centriranjem tabela

Ovako na jednom sajtu na kojem radim nikako nece da radi centriranje tabele tj. uvek je centrirana levo sta god da postavim u editoru.

Gledao sam i generisani kod i tamo je apsolutno sve u redu. Isprobao sam da napravim i novi clanak sa tabelom 2x2 i da je centriram po sredini bez ikakvog uspeha.
Posto sam procitao da JCE ume da "zezne" stvar oko centriranja tabela, isto sam probao u TinyMCE editoru bez ikakvog uspeha tj. centriranje tabele na sajtu/artiklu jednostavno ne radi.

Koristim Joomlu 1.73 i JCE 2.0.20, a isto sam isprobao i sa JCE 2.0.19.

Pomislio sam i da je do template-a, jer je po defaultu u templateu stajalo da tabela ima okvir bez obzira sta ja podesio kao border u samom clanku. Ali nazalost taj deo nisam uspeo da nadjem u template.css fajlu i tako da je i dalje imam problem.

Evo ga i deo templatea koji se bavi tabelema
Code:
/** Tables **/
table {
	border-collapse:collapse;
}
tr, td {
	text-color: #ffffff;
}
table.weblinks,
table.category {
	margin:10px 10px 20px 0px;
	width:100%;
}
table.weblinks td,
table.category td {
	border-collapse:collapse;
	padding:7px;
}
table.weblinks th,
table.category th {
	padding:7px;
	text-align:left;
}
td.num {
	vertical-align:top;
	text-align:left;
}
td.hits {
	vertical-align:top;
	text-align:center;
}
td p {
	margin:0;
	line-height:1.3em;
}
.display-limit,
.filter {
	text-align:right;

}
tr.cat-list-row1 {
	background-color: rgb(242,242,242);
}
table.weblinks th,
table.newsfeeds th,
table.category th,
table.jlist-table th {
	background: #000000;
}
table.weblinks th a,
table.newsfeeds th a,
table.category th a,
table.jlist-table th a,
table.weblinks th,
table.newsfeeds th,
table.category th,
table.jlist-table th {
	color:#fff;
}
table.category th a img {
	border:solid 0px ;
	display: none;
}
table.category th a:hover {
	color: blue;
}
table.moduletable td,
table.moduletable tr {
	border:0;
}
Cak sam pomislio da ga ovo text-align koji je postavljen nalevo ne muci, ali ni to nije resenje.

Da li je iko imao slican problem i kako ga je resio? Ili sam nesto propustio u template kodu?
Last edited by ThePocetnik; 22nd January 2012 at 11:37..
ThePocetnik is online now   Reply With Quote
Old 22nd January 2012, 12:35   #2
Lukija
PCAXE Eminent Guru
 
Join Date: 13th April 2009
Posts: 2,569
Pogledaj ovo:

http://www.granneman.com/webdev/codi.../centertables/
Lukija is offline   Reply With Quote
Old 22nd January 2012, 12:54   #3
ThePocetnik
Redakcija
ThePocetnik's PC
 
ThePocetnik's Avatar
 
Join Date: 30th March 2009
Location: Beograd, Srbija
Posts: 1,722
Hvala ti, ovaj link mi je pomogao i uspeo sam da podesim.

Inace resio sam to metodom 1 gde sam u CSS dodao:
Code:
table.center {
    margin-left:auto; 
    margin-right:auto;
}
Posle sam za klasu tabele stavio center i radi cak i pod IE9, bez obzira sto mi ne stoji body {text-align:center;} u CSS-u.

Samo ne znam sto ne funkcionise
Code:
<table align="center">
    ...
</table>
kada mi to savrseno radi na drugom sajtu sa j1.7.3 i JCE 2.0.19. doduse sa drugim templateom?


Sada sam resio problem i na drugi nacin bez navodjenja klase tabele, jer sam jednostavno izmenio CSS:
Code:
table {
	border-collapse:collapse;
}
u

Code:
table {
	border-collapse:collapse;
	margin-left:auto; 
        margin-right:auto;
}
Last edited by ThePocetnik; 22nd January 2012 at 12:59..
ThePocetnik is online now   Reply With Quote
Old 22nd January 2012, 13:00   #4
Lukija
PCAXE Eminent Guru
 
Join Date: 13th April 2009
Posts: 2,569
Quote:
Originally Posted by Ivan1981 View Post
Samo ne znam sto ne funkcionise
Code:
<table align="center">
    ...
</table>
Valjda sto je zastareo? Mada to nije razlog da ne radi.

http://www.w3schools.com/tags/att_table_align.asp
Lukija is offline   Reply With Quote
Go Back   PCAXE forum > SOFTVER > Aplikativni softver
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:06.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright by PCAXE