JQuery Scroller - Post ID 204380

User 2924428 Photo


Registered User
1,718 posts

Hey again Inger, I am actually trying to get the three boxes left to right under the main image from youtube :) Is there something that I should be looking for before you delete the page from your website? I just want a larg box and three boxes left to right under it to show some pictures. Thanks again Inger you rule!!
User 122279 Photo


Senior Advisor
14,624 posts

Check it again: http://www.eikweb.no/test-for-matt/matt2.html
Do you mean like that?

What I did was createing a new class '.boxes', stuck your three other boxes inside and floated them left. The '.boxes' needs to have a width so that the other boxes fit exactly (including padding, margins and borders). If not, they will not center. And the class customfont needs a 'clear: left; to remain in the center below the three boxes.
You can adjust the space between theboxes, but then you have to adjust the '.boxes' accordingly.

About centering:
When you use html to center something, you need the syntax <center> (your contents)</center>. Just a series of <center> will not work well.

The background:
You have exchanged the 'backround.png' for another one. Upload the original 'backround.png' (grab it from my test site if necessary) and it will be all fixed.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2924428 Photo


Registered User
1,718 posts

Makes perfect sense Inger, I love the way the website looks now.. but I have a question, i'm still not understanding why the top / left move of px wouldn't have moved the boxes as they did before some of the coding, having to create a .boxes, what exactly does the "." before boxes mean? Like a subclass, or division for the code? Like if I was to make an image, then wanted an image to appear hovering over that image I would do something like a.hover, and .pic or something like that?
User 122279 Photo


Senior Advisor
14,624 posts

The 'dot' is the denotation of a class, like the '#' is for an id. You should start using more classes than you do. One and the same class can be used several times on a page, whereas the same id can only be used once. One of the errors you had before I corrected it, was that you had used div id="menu" for each menu item, which was 5 times on the same page. I changed that to class.

The top/left thingie:
By using the top and left positioning, you would have got all the images lined horizontally by using the same distance from the top, and no br's between them. BUT giving the distance from the left side (or right side) would have been a fixed distance from the left or right edge, and with the lot of different screen sizes, it would not have been centered, except for the monitor size you have yourself, probably. That's why I had to create a container, the .boxes and center that. The centering is made by margin: auto;
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 38401 Photo


Senior Advisor
10,951 posts

The book "CSS: The Missing Manual" is a pretty good book for learning CSS. You can get the Inkling eBook which is interactive here:
https://www.inkling.com/store/book/css- … nAodIzAAOA

You can get the hard cover book here: LESS THAN 15 DOLLARS :)
http://www.barnesandnoble.com/listing/2 … la&r=1

You can get the normal eBook here: DRM FREE (no Publisher Protection, direct from publisher so you can open it on pretty much any device)
http://shop.oreilly.com/product/9780596802455.do

It's a very good book and I think you would definitely benefit from it. Hope that helps.
User 2924428 Photo


Registered User
1,718 posts

@Inger Ok now i'm starting to catch on, I can use the "dot"s as many times as I want, and the "id" I can only use once per <div "id"= > so the id's are #'s and the "dot"s are divisions. Thank you for all your help Inger, I really appreciate it!!
@ Jo Ann - I will have to look into this, Is it similar to CoffeeCup's version of HTML5 / CSS3? I'm still learning a lot about HTML5 and I wanted to take a break from it to learn a little CSS. Thank you very much for the recommendation!
User 38401 Photo


Senior Advisor
10,951 posts

No it's not HTML much at all, it's all about CSS before CSS3 and HTML5 came in. This is the place to start before really delving into the CSS3 stuff as it has all the backbone of the code to start with. Much more detailed than the CoffeeCup one (sorry CC :P )
User 38401 Photo


Senior Advisor
10,951 posts

UnclePlusMax wrote:
@Inger Ok now i'm starting to catch on, I can use the "dot"s as many times as I want, and the "id" I can only use once per <div "id"= >


The ID's (#) can only be used once per page, not per div.
User 122279 Photo


Senior Advisor
14,624 posts

UnclePlusMax wrote:
@Inger Ok now i'm starting to catch on, I can use the "dot"s as many times as I want, and the "id" I can only use once per <div "id"= > so the id's are #'s and the "dot"s are divisions.


If you declare a #menu in your css, you can have the <div id="menu">(menu stuff)</div> only once in the html on that page. You can have another id, like #container, or #scroller also just once on the same page. You can of course use them on another page of the same site, but only once per page.

If you declare say a .textbox, you can have as many textboxes you want on each page, like this: <div class="textbox"> (contents of the box) </div>. The trick is to declare things you will only use once on a page as ID's, and things you are likely to use more than once as classes.

I'm not familiar with the book Jo Ann is recommending, but I'm sure the differences between id's and classes will be explained thoroughly. Another great source is of course W3schools: http://www.w3schools.com/css/ Doesn't cost anything, for starters...
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 38401 Photo


Senior Advisor
10,951 posts

Yeah that site is good, but the book gives a lot more detailed explainationsof things which help a lot more for people just learning it completely. I use that site a whole lot now for checking things and seeing what's updated recently and such though and compatibility factors.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.