Question:
HTML & CSS Width question?
2013-07-19 13:30:07 UTC
Hello, I'm trying to self teach myself web design & development, but I am having a bit of trouble understanding width and heights basically, I've designed a fixed website which looks ok in my browser (most pages other than the really small ones like about which doesn't reach a full page in 1920x1080) and now I'm trying to make it responsive so it'll look better but basically I want it to look as it did, and I can't see to do it and I image if I put the width at 50% it'll look bad in every size other than 1920x1080, which obviously isn't what I want.

This is what my fixed one looks like and what I'd like my responsive one to look like
http://tinypic.com/view.php?pic=j953l0&s=5

And this is what it's currently looking like (responsive)
http://tinypic.com/view.php?pic=2qa6yo2&s=5

Thanks a lot for your time!
Three answers:
2013-07-19 17:56:48 UTC
if you want it to be responsive you'll probably have to use javascript, assuming you're trying to accommodate various screen sizes and resolutions.



so judging by the links, it looks like you're trying to more or less center the content and not have it float to the right...There are a myriad of ways to do this...



First, and not recommended, but perhaps the easiest is to use the align attribute for a container div...





content goes here







Though, it's not ideal as it's not supported in every browser.



You could try the margin-left: style to push the content more or less towards the middle...so like style = "margin-left: 200px;" or however many pixels you want. But this is only ideal if you know the exact value. And if people are viewing it on different resolutions, this is not the solution.



Another way is through javascript. You can detect the client's screen size through the screen.width and screen.height functions.



Or you could even use jquery. There's many nifty functions that can help you deal with this sort of thing.



http://jsfiddle.net/poppypoop/qCtwS/
?
2016-12-30 16:27:59 UTC
Why are you using CSS to define table residences? it somewhat is purely stupid. HTML will do what you % to and be a suggestions much less complicated to artwork with. submit to in concepts, tables are an HTML function, no longer a CSS element. there's no longer any cyber information superhighway clothier contained available in the marketplace which will use branch layers to define table helpful aspects. it is purely too plenty pointless artwork. you're able to desire to define branch identifiers on your CSS mutually as using tables and it somewhat is easy to do, yet you're making tables a suggestions too complicated to artwork with than they're truthfully. i % to propose you seem into using tables greater advantageous. i think of of you will discover the strategies you seek for for using uncomplicated HTML code.
2013-07-22 10:28:33 UTC
If you want to learn self learning HTML & CSS you should reading with practices at HTMLdogs.com, its best and learn too in an week easily ...........


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...