How to aling an image in center in HTML??
Answers
Answered by
8
Explanation:
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {VIVEK}
height: 600px;
width: 350px;
background-color: red; /* by imsocool */
background-image: repeating-radial-gradient(red, yellow 10%, green 15%); /* dont change values */
}
</style>
</head>
<body>
<div id="grad1" style="text-align:center;margin:auto;color:White;font-size:40px;font-weight:bold">
<br>
</br>Gradient Background
</div>
</body>
</html>
Answered by
96
ɪᴛ ᴄᴀɴ ʙᴇ ᴇᴀsɪʟʏ ᴄᴇɴᴛᴇʀᴇᴅ ʙʏ ᴀᴅᴅɪɴɢ ᴛʜᴇ ᴛᴇxᴛ-ᴀʟɪɢɴ: ᴄᴇɴᴛᴇʀ; ᴄss ᴘʀᴏᴘᴇʀᴛʏ ᴛᴏ ᴛʜᴇ ᴘᴀʀᴇɴᴛ ᴇʟᴇᴍᴇɴᴛ ᴛʜᴀᴛ ᴄᴏɴᴛᴀɪɴs ɪᴛ. ᴛᴏ ᴄᴇɴᴛᴇʀ ᴀɴ ɪᴍᴀɢᴇ ᴜsɪɴɢ ᴛᴇxᴛ-ᴀʟɪɢɴ: ᴄᴇɴᴛᴇʀ; ʏᴏᴜ ᴍᴜsᴛ ᴘʟᴀᴄᴇ ᴛʜᴇ <ɪᴍɢ> ɪɴsɪᴅᴇ ᴏғ ᴀ ʙʟᴏᴄᴋ-ʟᴇᴠᴇʟ ᴇʟᴇᴍᴇɴᴛ sᴜᴄʜ ᴀs ᴀ ᴅɪᴠ .
Similar questions