- This topic is empty.
-
AuthorPosts
-
June 27, 2011 at 6:40 am #33267GeneralKnowledgeParticipant
I just started learning CSS last night so forgive my terrible design.
I am more of a php programmer. I would appreciate any feedback it is obvious in the early stages.
Also quick question does anyone know why having doctype “” stops “background-size: 100% 100%;” from running?
Is it because background-size: is CSS3.
I am also interested on the background image. Does it show which city you are in correctly. How close it is?
Thanks for your time.
GeneralKnowledge
June 27, 2011 at 7:05 am #82370WaffleMemberI must say, your CSS isn’t bad if you say it’s your first go.
Personally, for something so simple, I would have done 1 main Div id.. and then div classes for the items inside the main div id.For example;
Squrk!!
ETC ETC.
This way, it’s much easier to style, a litle bit less code… and rather than giving each element the positioning.. its done in 1 hit.
June 27, 2011 at 7:38 am #82341jamygoldenMemberI think you should use ID’s wherever possible instead of classes, however, IDs should only be used once per page. As far as I know, javascript and CSS render IDs faster than classes. Also, try and keep you CSS selectors as precise as possible, eg: ‘a’ or ‘#menu a{}’, instead of ‘html body #content ul#menu li a{}’
I would do it like this:
CSSHTML
Regarding the background-size and doctype, I’m not sure. Try using this doctype instead:
As for the map. It’s way off :p I’m in South Africa and it was showing a map of Los Altos.
June 27, 2011 at 9:33 am #82437GeneralKnowledgeParticipantI tried “” no luck which is strange because I looked it up and it said that was html5’s doctype Oh well, I’ll try do something else other than “background-size:”. I think you are correct about javascript and CSS rendering ID’s faster, jamy_za your CSS is beautiful done, Thanks for your help. I can see how that is better.
I fixed the geolocation me being stupid I had hard coded it where the google servers are(Don’t ask), should work a treat now.
Thanks for all your help.
June 27, 2011 at 11:15 am #82439jamygoldenMember@GeneralKnowledge No problem, and good luck with your project. It seems pretty awesome so far =)
Check this out: https://css-tricks.com/3458-perfect-full-page-background-image/
It may help you with the full width background images.June 27, 2011 at 11:17 am #82440KMarimon1ParticipantI’m not getting a background image at all, I’m in Miami
June 27, 2011 at 11:20 am #82442jamygoldenMember@KMarimon1 maybe it’s still loading. Try hitting cmd / ctrl + R
It seems to be working correctly for me.June 27, 2011 at 11:28 am #82443KMarimon1Participant@jamy_za I’m sure its done loading, all i’m getting is a plain white background here is a screenshot (See for yourself)
June 27, 2011 at 2:07 pm #82454GeneralKnowledgeParticipant@jamy_za https://css-tricks.com/3458-perfect-full-page-background-image/ worked perfectly. Very nice.
@KMarimon1 I have fixed the problem I think. I am currently exception checking. I use javascript and cookies, I am current making a fall back. So it will work in a way with either. I am going to try and get it working with more browsers.June 28, 2011 at 4:36 am #82493furrball1383Memberhmm didn’t work with enough precision, it put me in hyderabad india and i’m in mumbai which is maharashtra india, other than that its pretty simple but sweet :D
June 28, 2011 at 3:38 pm #82527GeneralKnowledgeParticipant@sL1dr Yes it’s a total bummer. Before I had javascript calculate your windows aspect ratio and then translate that to the correct ratio for Google’s API and then scaling the image. @furrball1383 Just getting it in 640×640 and scaling is a lot simpler but less precise. 500-600km away I think, it’s getting closer sometime it is just terrible at locating someone. You may be behind some kind of proxy which always makes it hard to find some ones true location.
Fixed the problem’s with the background not showing up at all and I am got out the need for cookies. Now cookie is used to slightly reduce server load. Precision will always be a problem :(
Thanks for viewing.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.