+ Post New Thread
Results 1 to 9 of 9
EduGeek Joomla 1.5 Package Thread, text wont centre css in Projects:; Hello Im trying to change the top part of the joomla site and I'm starting to make some progress, but ...
  1. #1
    PEO
    PEO is offline
    PEO's Avatar
    Join Date
    Oct 2007
    Posts
    2,093
    Thank Post
    457
    Thanked 150 Times in 95 Posts
    Rep Power
    71

    text wont centre css

    Hello

    Im trying to change the top part of the joomla site and I'm starting to make some progress, but Im having trouble making my text centred in the table using css. For some reason it keeps pulling to the left.

    can anyone help me please.

    css code...

    Code:
    .ts-1 {
    	border: none;
    	height: 57px;
    	margin-left: auto;
    	margin-right: auto;
    	position: relative;
    	text-align: left;
    	width: 950px;
    }
    
    .ts-1-1 {
    	background-color: #333333;
    	border: none;
    	height: 19px;
    	left: 0px;
    	padding: 0px;
    	position: absolute;
    	top: 0px;
    	width: 475px;
    }
    
    .ts-1-2 {
    	background-color: #333333;
    	border: none;
    	height: 19px;
    	left: 475px;
    	padding: 0px;
    	position: absolute;
    	top: 0px;
    	width: 475px;
    }
    
    .ts-1-3 {
    	border: none;
    	height: 19px;
    	left: 0px;
    	padding: 0px;
    	position: absolute;
    	top: 19px;
    	width: 553px;
    }
    
    .ts-1-4 {
    	border: none;
    	height: 19px;
    	left: 553px;
    	padding: 0px;
    	position: absolute;
    	top: 19px;
    	width: 397px;
    }
    
    .ts-1-5 {
    	background-color: #cc9999;
    	border: none;
    	height: 19px;
    	left: 0px;
    	padding: 0px;
    	position: absolute;
    	top: 38px;
    	width: 950px;
    }
    php code

    PHP Code:
    <body class="gen-1">
    <!-- 
    Header /-->
            <
    div class="ts-1">
                <
    div class="ts-1-1">
                    <
    div align="center">spare</div>
                </
    div>
                <
    div class="ts-1-2">
                    <
    div align="center">additional</div>
                </
    div>
                <
    div class="ts-1-3">
                    <
    div align="center">logo</div>
                </
    div>
                <
    div class="ts-1-4">
                    <
    div align="center">search</div>
                </
    div>
                <
    div class="ts-1-5">
                    <
    div align="center">site menu</div>
                </
    div>
            </
    div>
        </
    body
    Attached Thumbnails Attached Thumbnails text wont centre css-stupidproblem.png  

  2. #2

    EduTech's Avatar
    Join Date
    Aug 2007
    Location
    Reading
    Posts
    5,062
    Thank Post
    160
    Thanked 920 Times in 723 Posts
    Blog Entries
    3
    Rep Power
    272
    this will do it:

    Code:
    <body class="gen-1"> 
    <!-- Header /--> 
            <div class="ts-1">
            <center> 
                <div class="ts-1-1"> 
                    <div>spare</div> 
                </div> 
                <div class="ts-1-2"> 
                    <div>additional</div> 
                </div> 
                <div class="ts-1-3"> 
                    <div>logo</div> 
                </div> 
                <div class="ts-1-4"> 
                    <div>search</div> 
                </div> 
                <div class="ts-1-5"> 
                    <div>site menu</div> 
                </div> 
                </center>
            </div> 
    </body>
    Leave the CSS as it is

    James.

    ignore me; it works in a general php editor.. i dont have joomla to look at the test of the code. sorry.
    Attached Thumbnails Attached Thumbnails text wont centre css-image01.png  
    Last edited by EduTech; 4th July 2009 at 09:09 PM.

  3. #3
    PEO
    PEO is offline
    PEO's Avatar
    Join Date
    Oct 2007
    Posts
    2,093
    Thank Post
    457
    Thanked 150 Times in 95 Posts
    Rep Power
    71
    Thanks James unfortunately it dosent work. If i create this without the rest of the index content, it then works fine.... something else in the edujoomla code must be making it all go left

  4. #4
    PEO
    PEO is offline
    PEO's Avatar
    Join Date
    Oct 2007
    Posts
    2,093
    Thank Post
    457
    Thanked 150 Times in 95 Posts
    Rep Power
    71
    eh, where has james post reply gone lol

  5. #5
    PEO
    PEO is offline
    PEO's Avatar
    Join Date
    Oct 2007
    Posts
    2,093
    Thank Post
    457
    Thanked 150 Times in 95 Posts
    Rep Power
    71
    no worries

  6. #6
    mossj's Avatar
    Join Date
    Dec 2008
    Location
    Leicester
    Posts
    1,466
    Thank Post
    157
    Thanked 189 Times in 174 Posts
    Rep Power
    52
    Why not just change ts-1, text-align from "left" to "center".

    You have everything else positioned absolute so it shouldn't effect the layout. and it will be inherited down the chain.

    p.s nice to see you changed the colors so you can see whats what... Neopolitten is so in this year!

  7. #7
    PEO
    PEO is offline
    PEO's Avatar
    Join Date
    Oct 2007
    Posts
    2,093
    Thank Post
    457
    Thanked 150 Times in 95 Posts
    Rep Power
    71
    Quote Originally Posted by mossj View Post
    Why not just change ts-1, text-align from "left" to "center".

    You have everything else positioned absolute so it shouldn't effect the layout. and it will be inherited down the chain.

    p.s nice to see you changed the colors so you can see whats what... Neopolitten is so in this year!
    lol!!! graphics to be added later. just doing one step at a time, I've made some progress

  8. #8
    PEO
    PEO is offline
    PEO's Avatar
    Join Date
    Oct 2007
    Posts
    2,093
    Thank Post
    457
    Thanked 150 Times in 95 Posts
    Rep Power
    71
    stupid problem progress. just need to create a top menu module, change sitemenu, and add graphics
    Attached Thumbnails Attached Thumbnails text wont centre css-stupidproblemprogress.png  

  9. #9
    mossj's Avatar
    Join Date
    Dec 2008
    Location
    Leicester
    Posts
    1,466
    Thank Post
    157
    Thanked 189 Times in 174 Posts
    Rep Power
    52
    All easy enough to do just look it up on the Official Joomla Wiki or use sysmans templates as examples (thats what I do )

    I think all you need to do, is add the position to the xml file, and then to the php/html itself.

SHARE:
+ Post New Thread

Similar Threads

  1. IT Support Centre
    By beeswax in forum Recommended Suppliers
    Replies: 8
    Last Post: 20th September 2008, 09:29 PM
  2. Centre text with eg_brown template.
    By FN-GM in forum EduGeek Joomla 1.0 Package
    Replies: 9
    Last Post: 2nd July 2008, 10:31 PM
  3. The IT Support Centre
    By Sylv3r in forum Bad Experiences
    Replies: 11
    Last Post: 21st September 2006, 08:22 AM
  4. New centre block
    By Dos_Box in forum General EduGeek News/Announcements
    Replies: 8
    Last Post: 11th October 2005, 02:45 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •