Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | mini dv to pc

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion
Register FAQ Community Calendar

Custom Scrollbars CSS Help
Reply
 
Thread Tools
Old 07-07-2005, 21:43   #1
jtwn
Inactive
 
Join Date: Nov 2003
Location: Grimsby
Posts: 2,004
jtwn has reached the bronze age
jtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze age
Custom Scrollbars CSS Help

Got a problem, when I declare my doctype to HTML 4.01 my custom colour scrollbars disappear, when I remove it they return. Is it not correct markup or something for the version?

Also I never made my site compliant with any standards, I just made it so that it came out as I wanted to see in IE....not so in FF. Ironed out most of the problems but the biggest I can't get my head around, to center for IE, I made a container div of the whole site <div id="center"> with

#center {
position : absolute;
left:50%;
margin:0 0 0 -425px;
}

in the style.css. It works just like that, I remove any one of those and the positioning of the site goes crazy, the only way I have read to get the entire site vertically aligned in firefox is by modifying the margin values but I tried it and it had no effect.
Thanks
jtwn is offline   Reply With Quote
Advertisement
Old 07-07-2005, 22:22   #2
Jon M
Inactive
 
Jon M's Avatar
 
Join Date: Oct 2003
Location: East Midlands
Age: 48
Services: Rural BB - Radio Link via Virgin Fibre
Posts: 2,947
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Send a message via MSN to Jon M
Re: Custom Scrollbars CSS Help

To get the scrollbar CSS to work with the DOCTYPE set, apply it to the HTML element instead of the BODY element.
The reason is because it's non standard CSS.

I'll come back to you on the other questions once I've done some testing.
__________________

see my post below for the "center" css that works
Jon M is offline   Reply With Quote
Old 07-07-2005, 22:30   #3
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Custom Scrollbars CSS Help

<insert usual rant about taking over the user's UI and not adhering to standards>
__________________

Quote:
Originally Posted by jtwn
Got a problem, when I declare my doctype to HTML 4.01 my custom colour scrollbars disappear, when I remove it they return. Is it not correct markup or something for the version?

Also I never made my site compliant with any standards, I just made it so that it came out as I wanted to see in IE....not so in FF. Ironed out most of the problems but the biggest I can't get my head around, to center for IE, I made a container div of the whole site <div id="center"> with

#center {
position : absolute;
left:50%;
margin:0 0 0 -425px;
}

in the style.css. It works just like that, I remove any one of those and the positioning of the site goes crazy, the only way I have read to get the entire site vertically aligned in firefox is by modifying the margin values but I tried it and it had no effect.
Thanks
#center {
width: 800px; /* example size */
margin-left: auto;
margin-right: auto;
}

Probably won't work in IE but does in all others.
Richard M is offline   Reply With Quote
Old 07-07-2005, 23:20   #4
Jon M
Inactive
 
Jon M's Avatar
 
Join Date: Oct 2003
Location: East Midlands
Age: 48
Services: Rural BB - Radio Link via Virgin Fibre
Posts: 2,947
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Send a message via MSN to Jon M
Re: Custom Scrollbars CSS Help

Quote:
Originally Posted by Richard M
<insert usual rant about taking over the user's UI and not adhering to standards>
I thought about making it another FF fanboy thread, with a healthy portion of standards compliance thrown in.. but thought better of it..

You're right about your code not working in IE though, which doesn't really get him any further unfortunatly.
__________________

Ok, this is ugly, but it works:

#center {position: absolute;
top: center;
left: 50%
}

(make the "top" parameter either a percentage or a pixel value to move it down)
__________________

Did that work ok?

Let me know if you want it to look different and I'll see if I can tweak it.

Have you got this site online?
Jon M is offline   Reply With Quote
Old 07-07-2005, 23:42   #5
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Custom Scrollbars CSS Help

Quote:
Originally Posted by Richard M
<insert usual rant about taking over the user's UI and not adhering to standards>
__________________

Quote:
Originally Posted by jtwn
Got a problem, when I declare my doctype to HTML 4.01 my custom colour scrollbars disappear, when I remove it they return. Is it not correct markup or something for the version?

Also I never made my site compliant with any standards, I just made it so that it came out as I wanted to see in IE....not so in FF. Ironed out most of the problems but the biggest I can't get my head around, to center for IE, I made a container div of the whole site <div id="center"> with

#center {
position : absolute;
left:50%;
margin:0 0 0 -425px;
}

in the style.css. It works just like that, I remove any one of those and the positioning of the site goes crazy, the only way I have read to get the entire site vertically aligned in firefox is by modifying the margin values but I tried it and it had no effect.
Thanks
#center {
width: 800px; /* example size */
margin-left: auto;
margin-right: auto;
}

Probably won't work in IE but does in all others.
Aah sorry I thought you wanted it aligned the other way.
AFAIK there is no reliable way to do this, especially yours because it will fail in other resolutions.
Richard M is offline   Reply With Quote
Old 08-07-2005, 16:27   #6
jtwn
Inactive
 
Join Date: Nov 2003
Location: Grimsby
Posts: 2,004
jtwn has reached the bronze age
jtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze age
Re: Custom Scrollbars CSS Help

OK, I've tried all the solutions here but to no avail

Would appreciate any pointers on getting the scrollbars and centering right. I know there is alot of redundant code there but as the site has changed, I just added more code...

http://www.pojclan.co.uk/
jtwn is offline   Reply With Quote
Old 08-07-2005, 17:36   #7
Jon M
Inactive
 
Jon M's Avatar
 
Join Date: Oct 2003
Location: East Midlands
Age: 48
Services: Rural BB - Radio Link via Virgin Fibre
Posts: 2,947
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Send a message via MSN to Jon M
Re: Custom Scrollbars CSS Help

Got everything working except the scrollbars in FF (which I expected anyway)
Jon M is offline   Reply With Quote
Old 08-07-2005, 19:00   #8
jtwn
Inactive
 
Join Date: Nov 2003
Location: Grimsby
Posts: 2,004
jtwn has reached the bronze age
jtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze agejtwn has reached the bronze age
Re: Custom Scrollbars CSS Help

Thanks a tonne s1lv3r its much appreciated, you should be in the business with your skills =) We have post of the month here people!
jtwn is offline   Reply With Quote
Old 08-07-2005, 22:35   #9
Jon M
Inactive
 
Jon M's Avatar
 
Join Date: Oct 2003
Location: East Midlands
Age: 48
Services: Rural BB - Radio Link via Virgin Fibre
Posts: 2,947
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Send a message via MSN to Jon M
Re: Custom Scrollbars CSS Help

Lol, that was an easy one CSS wise.
Thanks though, I'm glad you got what you needed
Jon M is offline   Reply With Quote
Reply


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. The time now is 19:12.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum