CSS Set A Background Color Which Is 50 Of The Width Of The Window
Có thể bạn quan tâm
- Home
- Community
- Categories
- Web Development
- CSS
- CSS Set a background color which is 50 of the...
Attempting to create a "split-in-two" background with two colors on either side of the page (seemingly done by setting a default background color on the body tag, then applying another onto a div that stretches the entire width of the window).
Unfortunately, despite my best efforts, the background-size attribute is inoperable in IE7 and IE8, which is essential for this project-
body { background: #fff; } #wrapper { background: url(1px.png) repeat-y; background-size: 50% auto; width: 100%; }Since it's just about solid colors maybe there is a way using only the regular background-color property?
- css
- background-color
Jun 27, 2022 in CSS by Edureka • 13,750 points • 4,932 views answer comment - flag
Your comment on this question:
| Your name to display (optional): |
| Email me at this address if a comment is added after mine: |
| Privacy: Your email address will only be used for sending these notifications. |
| Add comment Cancel |
1 answer to this question.
Your answer
| Your name to display (optional): |
| Email me at this address if my answer is selected or commented on: |
| Privacy: Your email address will only be used for sending these notifications. |
| Add answer Cancel |
You can make a hard distinction instead of a linear gradient by putting the second color at 0%
For Example,
Gradient - background: linear-gradient(80deg, #ff0000 20%, #0000ff 80%);
Hard distinction - background: linear-gradient(80deg, #ff0000 20%, #0000ff 0%);
- flag
- ask related question
Your comment on this answer:
| Your name to display (optional): |
| Email me at this address if a comment is added after mine: |
| Privacy: Your email address will only be used for sending these notifications. |
| Add comment Cancel |
Related Questions In CSS
0 votes 1 answerWhy is the CSS border-color inheriting the color property?
An element in CSS can have two ...READ MORE
answered Jun 10, 2022 in CSS by Edureka • 12,720 points • 1,287 views- css
What is the proper way to display a logo with CSS?
An <img> element is the proper way ...READ MORE
answered Jun 10, 2022 in CSS by Edureka • 12,720 points • 1,370 views- css
- graphical-logo
Position a CSS background image x pixels from the right?
The attribute border can be used as ...READ MORE
answered Jun 10, 2022 in CSS by Edureka • 12,720 points • 1,485 views- css
CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
A simple solution is to make the ...READ MORE
answered Jun 21, 2022 in CSS by Edureka • 12,720 points • 5,103 views- css
- footer
CSS: background image on background color
If this panel is chosen, a panel ...READ MORE
Jun 22, 2022 in CSS by Edureka • 13,750 points • 1,027 views- css
- background
- background-image
- background-color
How to make div background color transparent in CSS
To begin, we will build a div> ...READ MORE
answered Jun 28, 2022 in CSS by Edureka • 12,720 points • 3,247 views- css
- html
- background-color
- transparent
Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?
HI.. SQL is Structured Query Language, which is ...READ MORE
answered Aug 8, 2020 in PHP by anonymous • 13,410 views- mysql
- linux-database
- linux
- php
- html
- css
How to get custom fonts on static aws site
I see this is an old post ...READ MORE
answered Sep 25, 2018 in AWS by Priyaj • 58,020 points • 3,387 views- css
- twitter-bootstrap
- amazon-web-services
- amazon-s3
- storage-service
- aws-storage-services
- aws-services
- font-face
when declaring css styles, what is the meaning of .classA.classB (two class names with a dot in the middle and no space)
The first example (space-separated classes) is a ...READ MORE
answered Jun 28, 2022 in CSS by Edureka • 12,720 points • 1,374 views- css
CSS shadow white line at the end of linear-gradient background
This is a byproduct of the gradient ...READ MORE
answered Jun 1, 2022 in CSS by Edureka • 12,720 points • 3,481 views- css
- background
- linear-gradients
Recent in CSS
- How can a:hover be implemented using inline CSS styles in React? Feb 12
- How can you implement flexbox for layout in CSS? Dec 16, 2024
- How to select parent element in CSS? Dec 6, 2024
- Hovering over button highlights entire table Nov 9, 2022
- Hovering over button highlights entire table Nov 9, 2022
- All categories
-
Generative AI (1,454) -
Power BI (1,316) -
DevOps & Agile (4,138) -
Data Science (100) -
ChatGPT (30) -
Cyber Security & Ethical Hacking (1,057) -
Data Analytics (1,266) -
Cloud Computing (4,053) -
Machine Learning (337) -
PMP (1,069) -
Python (3,489) -
SalesForce (201) -
Selenium (1,624) -
Software Testing (58) -
Tableau (608) -
Web Development (3,972) -
UI UX Design (24) -
Java (1,358) -
Azure (157) -
Database (858) -
Big Data Hadoop (1,907) -
Blockchain (1,673) -
Digital Marketing (121) -
C# (141) -
C++ (272) -
IoT (Internet of Things) (390) -
Kotlin (8) -
Linux Administration (389) -
MicroStrategy (7) -
Mobile Development (395) -
Others (2,387) -
RPA (653) -
Talend (73) -
TypeSript (124) -
Apache Kafka (84) -
Apache Spark (596) -
Career Counselling (1,091) -
Events & Trending Topics (28) -
Ask us Anything! (71)
Join the world's most active Tech Community!
Welcome back to the World's most active Tech Community!
Sign up with Gmail Sign up with FacebookOR
Password must haveAt least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
SIGN UP Already have an Edureka Account? Login Forgot Password? LOGIN Don’t have edureka account? Sign Up resend ? Password must haveAt least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
reset password Don’t have edureka account? Sign Up reset password Don’t have edureka account? Sign Up Send Code Don’t have edureka account? Sign UpSubscribe to our Newsletter, and get personalized recommendations.
Already have an account? Sign in.
Từ khóa » Html Css Two Color Background
-
CSS: Set A Background Color Which Is 50% Of The Width Of The Window
-
CSS-Only Multi-Color Backgrounds - Prototypr
-
CSS Gradients - W3Schools
-
HTML & CSS - How To Split A Background Into 2 Colors - YouTube
-
Css Background With 2 Colors - CSS-Tricks
-
How To Split A Background Into 2 Colors With CSS | By Miguel Nunez
-
Two Color Background Css Code Example - Code Grepper
-
Using Multiple Backgrounds - CSS: Cascading Style Sheets | MDN
-
How To Make Two Color Background In Css?
-
CSS Background Color – How To Change The Background Color In ...
-
How To Add & Change Background Color In HTML - HubSpot Blog
-
CSS Gradient — Generator, Maker, And Background
-
14 Colors And Backgrounds - W3C
Generative AI
Power BI
DevOps & Agile
Cyber Security & Ethical Hacking
Data Analytics
Cloud Computing
Machine Learning
Python
Selenium
Software Testing
Tableau
Web Development
Java
Database
Big Data Hadoop
Blockchain
IoT (Internet of Things)
Linux Administration
MicroStrategy
RPA
Talend
Apache Kafka
Apache Spark
Career Counselling
Events & Trending Topics