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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
Thread Tools
Old 10-02-2008, 08:04 AM   #1 (permalink)
rmb
Registered User
 
Join Date: Jul 2008
Posts: 12
OS: Windows XP Pro Service Pack 2


Send a message via Skype™ to rmb
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!
rmb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 10-02-2008, 09:14 AM   #2 (permalink)
Design Team Member
 
dm01's Avatar
 
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
Free multi-purpose text and source code editor
dm01 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 10-02-2008, 04:00 PM   #3 (permalink)
rmb
Registered User
 
Join Date: Jul 2008
Posts: 12
OS: Windows XP Pro Service Pack 2


Send a message via Skype™ to rmb
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,
rmb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 10-02-2008, 09:15 PM   #4 (permalink)
Design Team Member
 
dm01's Avatar
 
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
Free multi-purpose text and source code editor
dm01 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 10-04-2008, 08:27 AM   #5 (permalink)
rmb
Registered User
 
Join Date: Jul 2008
Posts: 12
OS: Windows XP Pro Service Pack 2


Send a message via Skype™ to rmb
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!
rmb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 10-04-2008, 08:29 AM   #6 (permalink)
rmb
Registered User
 
Join Date: Jul 2008
Posts: 12
OS: Windows XP Pro Service Pack 2


Send a message via Skype™ to rmb
Re: CSS classes

Sorry... I found the dreamweaver error, - I had double brackets, so i updated it and still not working...
rmb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 10-04-2008, 12:48 PM   #7 (permalink)
Design Team Member
 
dm01's Avatar
 
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
Free multi-purpose text and source code editor
dm01 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 10-05-2008, 05:35 PM   #8 (permalink)
rmb
Registered User
 
Join Date: Jul 2008
Posts: 12
OS: Windows XP Pro Service Pack 2


Send a message via Skype™ to rmb
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!
rmb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Reply


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -7. The time now is 04:24 PM.



Copyright 2001 - 2008, Tech Support Forum

Search Engine Friendly URLs by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82