eduard Posted September 16, 2012 Share Posted September 16, 2012 Another time a very serious problem which I can't write on the internet! For my website:To make my website suitable for all browsers, I've to write my css in %; not in pxs? Link to comment Share on other sites More sharing options...
Ingolme Posted September 16, 2012 Share Posted September 16, 2012 Both are good, it depends on where you're using them and what you're using them for. Different elements can use different units. Link to comment Share on other sites More sharing options...
eduard Posted September 16, 2012 Author Share Posted September 16, 2012 Both are good, it depends on where you're using them and what you're using them for. Different elements can use different units. But can you be more specific (or where can I read about it?) or is it always save when I use %? Link to comment Share on other sites More sharing options...
reg1965 Posted September 16, 2012 Share Posted September 16, 2012 Eddie baby..relax. Pixels are specific. The higher the resolution the smaller the pixel. % and em's are relative, maybe to parent containers. Must be careful using these. But they scale better for the user. You'll have to read about the specificity of scaling units on the internet or ask a more specific question here somewhere. Read this; http://www.impressivewebs.com/width-100-percent-css/ Hope that helps. Link to comment Share on other sites More sharing options...
eduard Posted September 16, 2012 Author Share Posted September 16, 2012 Eddie baby..relax. Pixels are specific. The higher the resolution the smaller the pixel. % and em's are relative, maybe to parent containers. Must be careful using these. But they scale better for the user. You'll have to read about the specificity of scaling units on the internet or ask a more specific question here somewhere. Read this; http://www.impressiv...00-percent-css/ Hope that helps. Many thanks! Link to comment Share on other sites More sharing options...
eduard Posted September 16, 2012 Author Share Posted September 16, 2012 (edited) Many thanks! Is an inline-element the same as a child element? And the parent element in %?The child element in pxs? Edited September 16, 2012 by eduardlid Link to comment Share on other sites More sharing options...
Ingolme Posted September 17, 2012 Share Posted September 17, 2012 "Child" and "parent" are relationships between elements. In this example, <h1> is a child of <div>, <div> is the parent of <h1> <div> <h1></h1></div> Inline and block are two different rendering modes for an element. When an element is a block, it behaves like a box. If an element is inline, it will behave like text. Link to comment Share on other sites More sharing options...
WebFerret Posted September 17, 2012 Share Posted September 17, 2012 To make a responsive website looks good on many different screens you will want to work in percentages or ems. CSS media queries will also be useful if you want to change your CSS depending on the device your site is being viewed on. Try to avoid pixels wherever possible. Link to comment Share on other sites More sharing options...
eduard Posted September 17, 2012 Author Share Posted September 17, 2012 (edited) "Child" and "parent" are relationships between elements. In this example, <h1> is a child of <div>, <div> is the parent of <h1><div> <h1></h1></div> Inline and block are two different rendering modes for an element. When an element is a block, it behaves like a box. If an element is inline, it will behave like text. Many thanks for your explanation! What's the difference between a box and a container? Edited September 17, 2012 by eduardlid Link to comment Share on other sites More sharing options...
eduard Posted September 17, 2012 Author Share Posted September 17, 2012 To make a responsive website looks good on many different screens you will want to work in percentages or ems. CSS media queries will also be useful if you want to change your CSS depending on the device your site is being viewed on. Try to avoid pixels wherever possible. So, I've to adapt my website to the most used screens? andWhen do I use pxs and when % because I haven't understood it good? Link to comment Share on other sites More sharing options...
thescientist Posted September 17, 2012 Share Posted September 17, 2012 (edited) What's the difference between a box and a container?same difference Edited September 17, 2012 by thescientist Link to comment Share on other sites More sharing options...
eduard Posted September 17, 2012 Author Share Posted September 17, 2012 same difference Are they the same or are they different? Link to comment Share on other sites More sharing options...
Ingolme Posted September 17, 2012 Share Posted September 17, 2012 They can refer to the same element, but in different contexts. A container is always a box, but a box is not necessarily a container. "Container" refers to an element that contains other elements, a box refers to how an element is rendered. Link to comment Share on other sites More sharing options...
eduard Posted September 17, 2012 Author Share Posted September 17, 2012 They can refer to the same element, but in different contexts. A container is always a box, but a box is not necessarily a container. "Container" refers to an element that contains other elements, a box refers to how an element is rendered. So, a container is an element of a box? Link to comment Share on other sites More sharing options...
Don E Posted September 17, 2012 Share Posted September 17, 2012 A container is an element that has other elements inside it. <div> <-- container <p>Hello</p> <--- element inside container</div> Link to comment Share on other sites More sharing options...
eduard Posted September 17, 2012 Author Share Posted September 17, 2012 A container is an element that has other elements inside it. <div> <-- container <p>Hello</p> <--- element inside container</div> Container and element are the content of a box? Link to comment Share on other sites More sharing options...
Ingolme Posted September 17, 2012 Share Posted September 17, 2012 A box is a rectangle on the screen. All containers are boxes. All boxes are representations of HTML elements. Link to comment Share on other sites More sharing options...
eduard Posted September 18, 2012 Author Share Posted September 18, 2012 A box is a rectangle on the screen. All containers are boxes. All boxes are representations of HTML elements. Ok, thanks! Link to comment Share on other sites More sharing options...
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