inherit
250182
0
Dec 13, 2023 22:58:15 GMT -8
private
499
October 2017
private1
|
Post by private on Jun 28, 2018 11:24:44 GMT -8
Forum URL: Creative Writing & Themes & Chatting.I created a rounded square frame on Paint 3D. I want it to be used as a frame around my forum. How do I get this image to be 80% of the forum's width?
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jun 28, 2018 11:29:10 GMT -8
Hi, private. Adding a CSS width property to its inline styles would change its width relative to its parent element.
|
|
inherit
250182
0
Dec 13, 2023 22:58:15 GMT -8
private
499
October 2017
private1
|
Post by private on Jun 28, 2018 12:43:30 GMT -8
Hi, private . Adding a CSS width property to its inline styles would change its width relative to its parent element. Adding this code <img src="https://s5.postimg.cc/6tqqyie93/Round_Square_Frame.jpg" style="width: 80%;"> to the bottom of the style sheet failed.
|
|
#e61919
Support Staff
224482
0
1
Nov 22, 2024 17:59:24 GMT -8
Scott
“Asking for help isn't giving up... it's refusing to give up.”
24,530
August 2015
socalso
|
Post by Scott on Jun 28, 2018 12:54:06 GMT -8
private, that code is HTML, not CSS. Only CSS can be added to the style sheet. What Brian said was to add a "CSS width property" to the inline style of the element. This is the inline style.... style="width: 80%;" ... that is added to the HTML img tag. If the border is to be for the whole forum (every page) then you should add that whole code to the forum wrapper layout template.
|
|
inherit
250182
0
Dec 13, 2023 22:58:15 GMT -8
private
499
October 2017
private1
|
Post by private on Jun 28, 2018 13:15:26 GMT -8
private , that code is HTML, not CSS. Only CSS can be added to the style sheet. What Brian said was to add a "CSS width property" to the inline style of the element. This is the inline style.... style="width: 80%;" ... that is added to the HTML img tag. If the border is to be for the whole forum (every page) then you should add that whole code to the forum wrapper layout template. Do you mean this: www.w3schools.com/css/css_inline-block.asp
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jun 28, 2018 13:16:20 GMT -8
If you're looking to use the image as a border around your forum there's a few problems with that.
- The image isn't going to expand or shrink to meet your forum's size - The image has a set height, while your forum's content has varying heights - Even if you use a background-size property to change the size of the image the borders are going to change in thickness due to the image resizing
Since your border consists of a solid line with a single color there's no real reason to use an image to do this as you can use CSS to add a border to the forum's wrapper element.
|
|
#e61919
Support Staff
224482
0
1
Nov 22, 2024 17:59:24 GMT -8
Scott
“Asking for help isn't giving up... it's refusing to give up.”
24,530
August 2015
socalso
|
Post by Scott on Jun 28, 2018 13:26:28 GMT -8
private , that code is HTML, not CSS. Only CSS can be added to the style sheet. What Brian said was to add a "CSS width property" to the inline style of the element. This is the inline style.... style="width: 80%;" ... that is added to the HTML img tag. If the border is to be for the whole forum (every page) then you should add that whole code to the forum wrapper layout template. Do you mean this: www.w3schools.com/css/css_inline-block.aspNo. Simply put there are generally 2 parts to an element, the HTML and the CSS. HTML defines what the element is (paragraph, table, div, image, etc.) and the CSS defines the style of the element (color, size, etc.) In regards to the forums, the layout templates contain the HTML and the Style Sheet contains the CSS. Sometimes a style is defined within the HTML element tag rather than in the Style Sheet and this is called inline styling. This is the real watered-down explanation. You can visit our External Resources Help Guide article for sites that offer code reference and learning.
|
|
inherit
250182
0
Dec 13, 2023 22:58:15 GMT -8
private
499
October 2017
private1
|
Post by private on Jun 29, 2018 3:53:39 GMT -8
If you're looking to use the image as a border around your forum there's a few problems with that. - The image isn't going to expand or shrink to meet your forum's size - The image has a set height, while your forum's content has varying heights - Even if you use a background-size property to change the size of the image the borders are going to change in thickness due to the image resizing Since your border consists of a solid line with a single color there's no real reason to use an image to do this as you can use CSS to add a border to the forum's wrapper element. Brian: I thank you for your replies.
|
|
inherit
250182
0
Dec 13, 2023 22:58:15 GMT -8
private
499
October 2017
private1
|
Post by private on Jun 29, 2018 3:54:17 GMT -8
No. Simply put there are generally 2 parts to an element, the HTML and the CSS. HTML defines what the element is (paragraph, table, div, image, etc.) and the CSS defines the style of the element (color, size, etc.) In regards to the forums, the layout templates contain the HTML and the Style Sheet contains the CSS. Sometimes a style is defined within the HTML element tag rather than in the Style Sheet and this is called inline styling. This is the real watered-down explanation. You can visit our External Resources Help Guide article for sites that offer code reference and learning. Scott: Thank you for your reply.
|
|