Changing the html size and pos on hover of button help

I got it to work but only on the last button of the list this is what i made so far anyone have an idea on how to make it work on all of the buttons?




		html = vgui.Create( "HTML", Frame )

		local SeriousButtons = vgui.Create( "DButton", Frame )
		SeriousButtons:SetPos( ScrW()/195.14, Button_Y )
		SeriousButtons:SetText( "" )
		SeriousButtons.Hover = false
		SeriousButtons.OnCursorEntered 	= function() SeriousButtons.Hover = true end
		SeriousButtons.OnCursorExited	= function() SeriousButtons.Hover = false end
		SeriousButtons.DoClick = function() html:OpenURL(v.ButtonURL) end
		SeriousButtons.Paint = function() 
				
			SeriousButtons:SetSize( ScrW()/21.68, ScrH()/12.19 )
			html:SetPos( ScrW()/7.59, ScrH()/8.08 )
			html:SetSize( ScrW()/1.24, ScrH()/1.32 )
			draw.RoundedBox( 0, 0, 0, SeriousButtons:GetWide(), SeriousButtons:GetTall(), Color( 60, 60, 60, 255 ) )
			
			if SeriousButtons.Hover then
				html:SetPos( ScrW()/4.50, ScrH()/8.08 )
				html:SetSize( ScrW()/1.35, ScrH()/1.32 )
				SeriousButtons:SetSize( ScrW()/4.68, ScrH()/12.19 )
				draw.RoundedBox( 0, 0, 0, SeriousButtons:GetWide(), SeriousButtons:GetTall(), Color( 100, 100, 255, 255 ) )
			end
		end



You didn’t even post any code for the other buttons- also, why not just copy the code for the last button and change the name of the button it’s being used on?

its like this



for k, v in pairs(MotdButtons) do
		
		local SeriousButtons = vgui.Create( "DButton", Frame )
		SeriousButtons:SetPos( ScrW()/195.14, Button_Y )
		SeriousButtons:SetText( "" )
		SeriousButtons.Hover = false
		SeriousButtons.OnCursorEntered 	= function() SeriousButtons.Hover = true end
		SeriousButtons.OnCursorExited	= function() SeriousButtons.Hover = false end
		SeriousButtons.DoClick = function() html:OpenURL(v.ButtonURL) end
		SeriousButtons.Paint = function() 
				
			SeriousButtons:SetSize( ScrW()/21.68, ScrH()/12.19 )
			html:SetPos( ScrW()/7.59, ScrH()/8.08 )
			html:SetSize( ScrW()/1.24, ScrH()/1.32 )
			draw.RoundedBox( 0, 0, 0, SeriousButtons:GetWide(), SeriousButtons:GetTall(), Color( 60, 60, 60, 255 ) )
			
			if SeriousButtons.Hover then
				html:SetPos( ScrW()/4.50, ScrH()/8.08 )
				html:SetSize( ScrW()/1.35, ScrH()/1.32 )
				SeriousButtons:SetSize( ScrW()/4.68, ScrH()/12.19 )
				draw.RoundedBox( 0, 0, 0, SeriousButtons:GetWide(), SeriousButtons:GetTall(), Color( 100, 100, 255, 255 ) )
			end
		end
end


Wait, so what does the MotdButtons table have in it? Is it blank or does it have a bunch of buttons in it?

it has 5 but it can go up to 7 its for my motd that im making

can anyone help me?

Panel:IsHovered

Use that function on the button, then do html:SetSize(self:GetWide() YOURSIZING, self:GetTall() YOURSIZING)