Skip to content

Commit 4ed955e

Browse files
committed
fix(navbar): fix navbar width issue on larger screens
Updated the width value and added left and right to be 0 for the fixed navbar position to ensure that it stays centered no matter the screen size fix #10
1 parent 32302d6 commit 4ed955e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import SearchForm from './SearchForm';
33

44
const Navbar = () => {
55
return (
6-
<div className="fixed w-full flex items-center gap-4 py-4 justify-center backdrop-blur-md z-10">
6+
<div className="fixed left-0 right-0 w-full flex items-center gap-4 py-4 justify-center backdrop-blur-md z-10">
77
<Logo />
88
<SearchForm />
99
</div>

src/components/SearchForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ const SearchForm = () => {
4040
};
4141

4242
return (
43-
<form className="flex gap-2 w-1/2" onSubmit={handleSubmit}>
43+
<form className="flex gap-2 w-[30rem]" onSubmit={handleSubmit}>
4444
<label
4545
className="flex items-center input input-sm input-bordered w-full"
4646
style={{ outline: 'none', boxShadow: 'none' }}
4747
>
4848
<input
4949
type="text"
50-
className="grow placeholder:text-xs"
50+
className="grow placeholder:text-xs "
5151
placeholder="Type a domain..."
5252
autoFocus
5353
value={searchQuery}

0 commit comments

Comments
 (0)