[RESOLVED] My Code is Finally Complete!

Tell me I’m wrong when I say you knew the answer. You knew how to fix it.

Wanna do some more comparing? Go back and measure the two files that I prepared for you (the ones I keep referring back to). One contains your code with the inline styles. The other works exacly the same; however I took the inline styles out and wrote them in CSS. The sizes of the files are quite different:

4.1 K with inline styles
2.4 K without

All I did was take your styles out of the HTML and put them in CSS.

Which page do you think loads faster and cleaner?

Can you please tell me why the 1st one fits and the 2nd code doesn’t if their both 266px in width? http://newtest180.blogspot.com/

I thought this was [RESOLVED]?

I thought it was too till I put the code into blogger, and it’s not fitting for some strange reason.

Try a width of 270px

the width is 330 of the border around it and I’m not changing that. If the 1st code fits, there’s no reason why the 2nd code wouldn’t be able to fit either.

Is there a specific reason why it’s not fitting if their both 266 in width?

Each square is 50px wide plus 4px of margin. 54px times 5 = 270px. It’s all in the code.

So, code 2 is wider, how come? How come they both measure at 266 in width then?

Code 1

Code 2

What file is code 1 referring to and what file is code 2 referring to?

One has to see the code.

It’s all on here: How do I prevent the [div] from jumping out of the box when clicked on?

Code 1
http://www.cssdesk.com/DQJFx

Code 2 [fixed one]
http://www.cssdesk.com/afMAN

http://newtest180.blogspot.com/

The width of the “broken” 1 is influenced by word spacing, just like any series of inline objects with normal space between them might be.
The “fixed one” uses floats and the space between the squares is fixed at 4px by the margin:2px that is applied to them.

I wrote the “fixed one” so I can take the blame or responsibility for its width being 270px. I mentioned that in the topic, BTW.

Can that be fixed?

Can what be fixed? What is broken?

So it fits, what has to be adjusted?

Stop using indefinite pronouns.

So what fits what?

So it’s the right width of 266, which you say it’s 270.

This post from another of your topics might be worth a careful read, as it explains some of the issues you’re running into here.

1 Like