#home::before
{
content: "";
position: absolute;
background: url(1a.jpg) no-repeat center center/cover;
/* opacity: 1; */
height: 100%;
width: 100%;
z-index: -1;
filter: blur(1.5px);
}
here's my code but I want to include only a specific part of image to cover the whole background ..any suggestions/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>cakes by nandani</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Allura&display=swap" rel="stylesheet">
</head>
<body>
<nav id="navbar">
<div id="leftpor">
<ul>
<li class="items">Home</li>
<li class="items">About us</li>
<li class="items">Items</li>
</ul>
</div>
<!-- <div id="logo"><img src="logo.png" alt="Cakes by nandani"></div> -->
<div id="rightpor">
<ul>
<li class="items">Contact</li>
<li class="items">Gallery</li>
<li class="items">Our Story</li>
</ul>
</div>
</nav>
<section id="home">
<a class="Brand center"> Cakes By Nandani</a>
<a class="Tag center"> Many Emotiions One delight</a>
<button class="btn">Order Now</button>
</section>
<section id="services-container">
<h1 class="hprimary center">Our services</h1>
<div id="services">
<div class="box">
<img src="Oreo.jpg" alt="">
<p class="center">Oreo</p>
</div>
<div class="box">
<img src="Oreo.jpg" alt="">
<p class="center">Oreo</p>
</div>
<div class="box">
<img src="Oreo.jpg" alt="">
<p class="center">Oreo</p>
</div>
</div>
</section>
</body>
</html>
enter code here
only some part of image is cropped and used ....how to stop that
Related
i am using bootstrap here and i was trying to make a nav bar with some content and there is a link to a part of the site but the text i am linking to is being covered by the top nav bar
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<link rel="stylesheet" href="assets/css/style.css">
<title>website with navbar</title>
</head>
<body>
<div class="container sticky-top" style="background-color: #f1f1f1; top: 0;">
<h1>website</h1>
<ul class="nav nav-tabs">
<il class="nav-item">first lecture</il>
<il class="nav-item"><b>second lecture</b></il>
<il class="nav-item">third lecture</il>
<il class="nav-item">fourth lecture</il>
</ul>
</div>
<div class="container" style="margin-top: 30px;">
موقع coder shiyar<br>
email<br>
telephone
<h1 style="height: 700px; background-color: red;" id="h11">
first part
</h1>
<h1 style="height: 700px;background-color: rgb(0, 255, 42);" id="h1">
second part
</h1>
</div>
<div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.9.2/umd/popper.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/js/bootstrap.min.js"></script>
</div>
</body>
</html>
Add position: relative; to the style of the first <div> with class of .container (The one on top of <h1>website</h1>),
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<link rel="stylesheet" href="assets/css/style.css">
<title>website with navbar</title>
</head>
<body>
<div class="container sticky-top" style="background-color: #f1f1f1; top: 0; position: relative;">
<h1>website</h1>
<ul class="nav nav-tabs">
<il class="nav-item">first lecture</il>
<il class="nav-item"><b>second lecture</b></il>
<il class="nav-item">third lecture</il>
<il class="nav-item">fourth lecture</il>
</ul>
</div>
<div class="container" style="margin-top: 30px;">
موقع coder shiyar<br>
email<br>
telephone
<h1 style="height: 700px; background-color: red;" id="h11">
first part
</h1>
<h1 style="height: 700px;background-color: rgb(0, 255, 42);" id="h1">
second part
</h1>
</div>
<div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.9.2/umd/popper.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/js/bootstrap.min.js"></script>
</div>
</body>
</html>
Hi there,
I'm adding a search bar to my website, but when it add the
magnifying glass from font awesome, it doesn't show.
I only included the css for the search bar since I have
everything else set up nicely
What is the problem?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>OnTop Servers</title>
</head>
<body>
<nav class="topnav">
<div class="topnav-right">
<a class="active" href="index.html">Home</a>
Search
Servers
</div>
<h2 class="title">
OnTop Servers
</h2>
</nav>
<center>
<div class="welcome">
<div class="centered-text">
<div class="welcome-body-inner">
<h2 class="head">
DISCOVER
<span class="discord-logo">discord1</span>
SERVERS
</h2>
<h3 class="body">
Find amazing servers to interact with and make friends
</h3>
<div class="search-box">
<input class="search-txt" type="text" name="" placeholder="Search..">
<a class="search-btn" href="">
<i class="fas fa-search"></i>
</a>
</div>
</div>
</div>
</div>
</center>
Heres is the css for the search bar:
.search-box {
position: absolute;
top: 100%;
left: 35%;
transform: translate(-50%, -50%);
background: #2c2c2c;
height: 40px;
border-radius: 40px;
padding: 10px;
}
.search-btn {
color: #fff;
float: right;
width: 40px;
height: 40px;
border-radius: 50%;
background: #2c2c2c;
display: flex;
justify-content: center;
align-items: center;
}
Your problem with the code is that you did not include the Font Awesome Files or CDN or Icons to be exact. You have to fetch it from somewhere like Downloading the Font Awesome Icon or Simply use the CDN (Recommended)
I am giving you the CDN of font awesome and put this line of code in the <head> part of the code
The CDN is: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" /> or you can follow a tutorial in youtube and download those Icons
For Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" />
<title>OnTop Servers</title>
</head>
<body>
<nav class="topnav">
<div class="topnav-right">
<a class="active" href="index.html">Home</a>
Search
Servers
</div>
<h2 class="title">
OnTop Servers
</h2>
</nav>
<center>
<div class="welcome">
<div class="centered-text">
<div class="welcome-body-inner">
<h2 class="head">
DISCOVER
<span class="discord-logo">discord1</span>
SERVERS
</h2>
<h3 class="body">
Find amazing servers to interact with and make friends
</h3>
<div class="search-box">
<input class="search-txt" type="text" name="" placeholder="Search..">
<a class="search-btn" href="">
<i class="fas fa-search"></i>
</a>
</div>
</div>
</div>
</div>
</center>
Hope you have a great day!
I have to move my ESPN to most left on the Navbar and I need to add a scan icon in Navbar like this image. I am drawing the same picture but I won't be able to add the scan icon and add 3 bars right after the programming tab. I am designing the same picture in HTML but I can't get rid of these 2 to 3 things. Any help is really appreciated.
following this image
This is my code:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/components.css">
<link rel="stylesheet" href="css/icons.css">
<link rel="stylesheet" href="css/responsee.css">
<link rel="stylesheet" href="owl-carousel/owl.carousel.css">
<link rel="stylesheet" href="owl-carousel/owl.theme.css">
<link rel="stylesheet" href="css/template-style.css">
<link href='https://fonts.googleapis.com/css?family=Playfair+Display&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
</head>
<body class="size-1140">
<header role="banner" class="position-absolute">
<nav class="background-transparent background-transparent-hightlight full-width sticky">
<div class="s-20 l-2">
<a href="index.html" class="logo">
</a>
</div>
<div class="top-nav s-20 l-20">
<p class="nav-text"></p>
<ul class="right chevron">
<a style="text-align:right;">ESPN</a>
<li><a style="text-align:right;">HOME</a></li>
<li><a style="text-align:right;">SCHEDULE</a></li>
<li><a>PROGRAMMING</a>
<ul>
</ul>
</li>
<li><a >ABOUT</a></li>
<li><a >NEWS</a></li>
<li><a >CONTACT</a></li>
<li><a>SELECTLANGUAGE</a>
<ul>
</ul>
</li>
</ul>
</div>
</nav>
</header>
<!-- MAIN -->
<main role="main">
<!-- Main Header -->
<header>
<div class="carousel-default owl-carousel carousel-main carousel-nav-white background-dark text-center">
<div class="item">
<div class="s-12">
<img src="img/header.jpg" alt="">
<div class="carousel-content">
<div class="content-center-vertical line">
<div class="margin-top-bottom-80">
<!-- Title -->
<h1 class="text-white margin-bottom-30 text-size-60 text-m-size-30 text-line-height-1">ESPN SPORTS<br> PROGRAMMING</h1>
<div class="s-12 m-10 l-8 center"><p class="text-white text-size-14 margin-bottom-40">Welcome to ESPN's catalog of sports content available for broadcast worldwide.<br> Every year we distribute more than 6000 hours of live events, highlight series, <br> studio and scripted media to broadcasters across the globs.</p></div>
<div class="line">
<div class="s-10 m-10 l-3 center">
<a class="button button-white-stroke s-6" style="background-color:red;" href="/">+CONTACT US</a>
<a class="button button-white-stroke s-6" style="background-color:black;" href="/">WATCH DEMO</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<script type="text/javascript" src="js/responsee.js"></script>
<script type="text/javascript" src="owl-carousel/owl.carousel.js"></script>
<script type="text/javascript" src="js/template-scripts.js"></script>
</body>
</html>
my result
I think you are broken down into the wrong part. The logo and nav sections that need to be separated are easier to adjust.
nav {
display: flex;
align-items: center;
justify-content: space-around;
}
ul {
display: flex;
align-items: center;
justify-content: space-between;
list-style: none;
flex: 2;
}
p img {
width: 100px;
}
p {
flex: 1;
}
<nav>
<p><img src="https://cdn.iconscout.com/icon/free/png-256/espn-282356.png"></p>
<ul>
<li>HOME</li>
<li>SCHEDULE</li>
<li>PROGRAMMING</li>
<li>ABOUT</li>
<li>NEWS</li>
<li>CONTACT</li>
<li>SELECTLANGUAGE</li>
</ul>
</nav>
You can do this:
put this in head
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
put this where you want your icon to appear
<a><i class="material-icons">menu</i></a>
I just put my HTML through validation at W3C and got back the following error:
ERROR: CSS: text parse error - it's talking about the sidebar-container DIV.
What am I doing wrong? I have a couple of errors relating to the same sidebar-container div.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Prisma Kitchens</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="desctiption" content="Kitchen designers in Manchester.">
<meta name="author" content="Prisma Kitchens">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="css.css" style="text/css">
<link rel="stylesheet" href="responsive.css" media="screen and (max-width:970px)" style="text/css>
</head>
<body>
<div class="sidebar-container">
<div class="sidebar">
<div class="logo">
<!--Logo is here-->
</div>
<div class="links">
<ul>
<li>home</li>
<li>about</li>
<li>services</li>
<li>gallery</li>
<li>contact</li>
</ul>
</div>
</div>
</div>
<div class="right-container">
<div class="head_image_mobile"></div>
<div class="heading_image">
<!--Holds the image at top of page-->
</div>
<div class="content">
<div class="subheading">Why Choose Prisma Kitchens?</div>
<a class="button" href="about.html">Learn More...</a>
<div class="content_gap"></div>
<div class="subheading">What Can We Offer?</div>
<a class="button" href="services.html">Our Services...</a>
<div class="content_gap"></div>
</div>
</body>
</html>
It's type="text/css" not style="text/css". Also there was a " in type="text/css missing and a closing </div> at the end.
Cleaned up
<!DOCTYPE html>
<html lang="en">
<head>
<title>Prisma Kitchens</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="desctiption" content="Kitchen designers in Manchester.">
<meta name="author" content="Prisma Kitchens">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="css.css" type="text/css" >
<link rel="stylesheet" href="responsive.css" media="screen and (max-width:970px)" type="text/css">
</head>
<body>
<div class="sidebar-container">
<div class="sidebar">
<div class="logo">
<!--Logo is here-->
</div>
<div class="links">
<ul>
<li>home</li>
<li>about</li>
<li>services</li>
<li>gallery</li>
<li>contact</li>
</ul>
</div>
</div>
</div>
<div class="right-container">
<div class="head_image_mobile"></div>
<div class="heading_image">
<!--Holds the image at top of page-->
</div>
<div class="content">
<div class="subheading">Why Choose Prisma Kitchens?</div>
<a class="button" href="about.html">Learn More...</a>
<div class="content_gap"></div>
<div class="subheading">What Can We Offer?</div>
<a class="button" href="services.html">Our Services...</a>
<div class="content_gap"></div>
</div>
</div>
</body>
</html>
When i zoom in and out on my website, the navigation bar and my "Open Touch" text seems to go out of the div and float down and for my navigation bar, it seems to disappear word by word when i zoom in. I've been trying to fix this for the past 2days and researching on this website and nothing seems to work.
My code and codepen will be available as well
How can I keep the "Open Touch" Text from overlapping the navigation bar?
Demo: http://codepen.io/anon/pen/xqLLeJ
html
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Nunito:700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Baloo" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="magicstyle.css">
<body>
<!-- Section for Jobs Popup -->
<div id="job-popup">
<div class="x-div"><img class="x-icon1" id="fadeX" src="web%20x%20icon%20white.png"></div>
<div id="job-content">
<h1 id="jobWords">Test</h1>
</div>
</div>
<!-- Section for Contact Popup -->
<div id="contact-popup">
<div class="x-div2"><img class="x-icon2" id="fadeX2" src="web%20x%20icon%20white.png"></div>
<div id="contact-content">
<h1 id="contactWords">Test</h1>
</div>
</div>
<!-- Section for Press Popu -->
<div id="press-popup">
<div class="x-div3"><img class="x-icon3" id="fadeX3" src="web%20x%20icon%20white.png"></div>
<div id="press-content">
<h1 id="pressWords">Test</h1>
</div>
</div>
<div id="legal-popup">
<div class="x-div4"><img class="x-icon4" id="fadeX4" src="web%20x%20icon%20white.png"></div>
<div id="legal-content">
<h1 id="legalWords">Test</h1>
</div>
</div>
<div id="support-popup">
<div class="x-div5"><img class="x-icon5" id="fadeX5" src="web%20x%20icon%20white.png"></div>
<div id="support-content">
<h1 id="supportWords">Test</h1>
</div>
</div>
<div id="top-bar">
<a class="burger-nav"></a>
<div id="nav-menu">
<span id="job">Jobs</span>
<span id="contact">Contact</span>
<span id="press">Press</span>
<span id="legal">Legal</span>
<span id="support">Support</span>
</div>
</div>
<div id="container">
<div id="name-div">
<h1 id="name">Open Touch</h1>
</div>
<ul class="bubbles">
<li id="firstCircle"></li>
<li id="secondCircle"></li>
<li id="thirdCircle"></li>
<li id="fourthCircle"></li>
<li id="fifthCircle"></li>
<li id="sixthCircle"></li>
</ul>
</div>
</body>
</head>
</html>
Any help is appreciated,
Thank You
Take out overflow: hidden from
#nav-menu {
width: 50%;
height: 70%;
position: absolute;
z-index: 101;
word-wrap: break-word;
/* overflow: hidden; */
left: 15%;
top: 20%;
}