amitte Posted March 22, 2009 Report Posted March 22, 2009 hy.. (long time no see.. been in a vacation...) first of all i want to thank u all and stefan.... because of your help today my father business have his own web site... and i dont need to tell u what it means this days of economic chaos... this is my site for now (there is more to be done- more text, photos.. english version.. etc..) - http://www.blacksmith-yt.co.il so... my problem is- my site wont stay the same in different resolutions. i work with 768*1024.. but if i change the resolution the site get all messy and disordered.. what code i need to put in so the site wont change no metter which resolution is apllyed? thanks.. amit
jlhaslip Posted March 22, 2009 Report Posted March 22, 2009 Place the following rule on the Body: margin: 0 auto; and remove the margin-right: 26 px; from the wrapper to centre the site.
amitte Posted March 23, 2009 Author Report Posted March 23, 2009 thanks but it didnt work.. i thought of replacing all the PX definitions to %... u think its worth the effort?
Andrea Posted March 23, 2009 Report Posted March 23, 2009 for starters, add a doctype (HTML 4.01 strict). This works: div#site { width: 950px; height: 570px; margin: 10px auto 0; background: rgb(237,228,201); } I am not sure why you think you need the wrapper and the site divisions - I'd think one would be enough.
amitte Posted March 25, 2009 Author Report Posted March 25, 2009 well thelma.. thank u very much!!! it helped.... so i guess the "auto" attribute made the difference?? but why? how? and i have now other problem.. about the Doctype... is that the right way???- br /> "http://www.w3.org/TR/html40/strict.dtd"> because after i had put this line some elements on the pages got a little messy (the header and the nav bar is crooked) do u know why?
falkencreative Posted March 25, 2009 Report Posted March 25, 2009 "margin: 0 auto" tells the browser that the body element has a 0 top and bottom margin, and to equally space ("auto") both the left and the right margins.
amitte Posted March 25, 2009 Author Report Posted March 25, 2009 and if i want the top and bottom to be auto to? other thing... i just found out i have a bigger problem after i added the Doctype... not only the navbar and headers are misplaced.. when i hover on the small images in the gallery.. they didnt become enlarged.... why it hapend? and how can i fix things to be the way they were and also keep the doctype?
amitte Posted March 25, 2009 Author Report Posted March 25, 2009 by the way.. i found out now that the correct line is- br /> "[url]http://www.w3.org/TR/html4/strict.dtd[/url]"> but still... the problems are the same...
Andrea Posted March 25, 2009 Report Posted March 25, 2009 by the way.. i found out now that the correct line is-No, that's not correct - see here: http://www.w3schools.com/tags/tag_DOCTYPE.asp Use a validator, and make sure there are no coding errors.
amitte Posted March 26, 2009 Author Report Posted March 26, 2009 for starters, add a doctype (HTML 4.01 strict). that what u said... now im confused... i wrote in html 4.01... ok but what of the 3 i need - strict? Transitional? or frameset? and yep.. i'll try the validator
Andrea Posted March 26, 2009 Report Posted March 26, 2009 Frameset would be if you were using frames (don't do that). Of the other 2, strict is best - it forces you to write the cleaner code, while transitional does allow deprecated and presentational elements. And if you're wondering if you should use HTML or XHTML - read this
amitte Posted March 30, 2009 Author Report Posted March 30, 2009 ok thanks i'v been using the validator and it solved all of my problems.. another small step..
arc Posted August 11, 2009 Report Posted August 11, 2009 HI all... I am new to this blog..I have same resolution problem..but I really dont know that I need to insert the div code to CSS or to the main html code..anyone can please help me...I am stuck in this problem since long time...:| Thank you in advance for ne help.... Arc
falkencreative Posted August 11, 2009 Report Posted August 11, 2009 Arc, how about you start a new topic (rather than just adding on to this one) and fully explain what issue you are having. Post a link and/or the code you are using so we can better help you.
amitte Posted August 11, 2009 Author Report Posted August 11, 2009 sorry arc.. i didnt understand your q.. if u kindly repeat it more clearly i could be helpfull.. amit
arc Posted August 13, 2009 Report Posted August 13, 2009 Hi all.. sorry for this late response....I am crating a site and I am having problem with resolution in different browse. here is the code.. { |BODY| HOME | INFO | SITE MAP | CONTACT | |FOOTER| }
Andrea Posted August 14, 2009 Report Posted August 14, 2009 Arc - I think resolutions may be the least of your problems. The center tag is deprecated, tables should be used for tabular data and not layout - plus, you have a couple tables in there that don't even have any rows or cells. And when you say "padding: 5" --- 5 what? px, %, em, cm, or o'clock? Any chance you can just post a link so we can see the entire page?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now