![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Registered User
|
CSS classes
Hi. Over the past week I decided to design a brand new website instead of trying to fix up the mess on my old site, and I am glad because the new site looks so much better. So now I want to get everything right from the beginning in order to prevent creating a messy website...
Ref: http://www.stereofx.za.net - New Site http://www.stereofx.net - Old Site I am as far as completed the design in fireworks and exported the images and nested table and so on. Fireworks also created a seperate javascript and seperate CSS document, and I've imported into Dreamweaver 8. My first problem is trying to center - align the table, by default it's aligned to the left. I could create a new table and cut & paste the current table into the new table and align the new table to the centre, but that seems messy so I don't want to do it that way, unless there is no other way to allign the current table to the centre??? Do I have to create a new class in my style sheet (index.css) and apply the class to the table? If yes, what is the code for this because everytime I try this it doesn't work, not sure why. One more thing I want to ask is about changing the colour of the scrollbar... Do I put the code into the style sheet, and apply this scrollbar colour code class to the main table? Thanks! |
|
|
|
|
|
#2 (permalink) |
|
Design Team Member
Join Date: Oct 2006
Location: Richmond, B.C.; Canada
Posts: 666
OS: Windows XP [Version 5.1.2600] SP3 | Ubuntu Hardy Heron
|
Re: CSS classes
In the CSS, add:
table.center {text-align: center} Add class="center" to <table> <table> becomes <table class="center"> I can't see how to change the scroll bar colour if I can't see the relevant scrolling bar. :)
__________________
![]() Validate your Markup Validate your CSS
|
|
|
|
|
|
#3 (permalink) |
|
Registered User
|
Re: CSS classes
Somehow, I'm missing something, not sure what I didn't do right, still couldn't center-allign it? I added the code to the style sheet and added the class to the table...
I have updated it, and also put some spaces in to show the scroll-bar which is currently at the default colours. Thanks, |
|
|
|
|
|
#4 (permalink) |
|
Design Team Member
Join Date: Oct 2006
Location: Richmond, B.C.; Canada
Posts: 666
OS: Windows XP [Version 5.1.2600] SP3 | Ubuntu Hardy Heron
|
Re: CSS classes
Sorry, the CSS is {margin-left: auto; margin-right: auto; text-align: center;}
Ah, you need to change the hex value of { scrollbar-base-color: colour } to the colour you want. Please be advised the use of scrollbar-base-color is not valid. I am working on an alternative.
__________________
![]() Validate your Markup Validate your CSS
|
|
|
|
|
|
#5 (permalink) |
|
Registered User
|
Re: CSS classes
I tried putting in the new code into the style sheet, and still didn't work :(
I am new to CSS so maybe I'm doing something wrong, but dreamweaver recognized the new code given as an error... If you go to http://www.stereofx.za.net/css you can download the style sheet... Maybe you can see if I'm doing something wrong? Thanks! |
|
|
|
|
|
#7 (permalink) |
|
Design Team Member
Join Date: Oct 2006
Location: Richmond, B.C.; Canada
Posts: 666
OS: Windows XP [Version 5.1.2600] SP3 | Ubuntu Hardy Heron
|
Re: CSS classes
It's kind of hard to centre a table that doesn't exist :).
If you want the whole page centred: HTML Code:
body {
text-align: center; /* for IE */
}
div#wrapper {
text-align: left; /* re-sets text alignment for the rest of the document */
width: 748px; /* could also be a percentage */
margin: 0 auto; /* for the other browsers */
}
__________________
![]() Validate your Markup Validate your CSS
|
|
|
|
|
|
#8 (permalink) |
|
Registered User
|
Re: CSS classes
Okay... So I have therefore used the alternative and created a table and cut/pasted everything into the table and centre-aligned the table I created... That must be the only way then...
But moving back to the scroll-bar colour issue..... I have the colours and code for my custom scroll-bar, and additionally I also want to put scroll-bars in some of the tables which I've created on the page in my custom colours: scrollbar-face-color: #1b8aaf; scrollbar-highlight-color: #ffffff; scrollbar-shadow-color: #808080; scrollbar-3dlight-color: #ffffff; scrollbar-arrow-color: #ffffff; scrollbar-track-color: #89bcd8; scrollbar-darkshadow-color: #000000; I have tried putting in the code in my style sheet, and I can't get it to work... This is tricky. Where exactly in the style sheet do I insert the code??? My next question is how do I put a scroll bar into a table? (eg: The "Latest News" table) I have the following code but again, I don't know where to put it in the style sheet... <div style ="overflow-y:scroll; "> </div> webpage updated - http://www.stereofx.za.net style sheet updated - http://www.stereofx.za.net/css Thanks in advance! |
|
|
|
![]() |
| Thread Tools | |
|
|