Site Title Image will not Center, nor will Nav Menu Bar?
-
I am very new to website development and using CSS. First, to try and center the site title image I have tried to the following code, as suggested on this thread.
#site-title img { margin-left: auto; margin-right: auto; }
This did not work, as it simply moved my site title image all the way to the left of the screen – it apparently did nothing?.
I then found this thread but cannot seem to get this % to split the difference of available margin space when the screen size is reduced. In fact, when I use the margin-left of approximately 40% necessary to center my image on my full-screen laptop, it pushed the image off of my page when the screen size is reduced.
There has to be some simple way to center my site title image regardless of the screen size, right? I do not want to just use a set number of pixels, as this will obviously create problems with centering on notebooks, smartphones, etc. Anyone have suggestions?
I am having an identical problem with attempting to center my menu/nav bar on varying screen sizes: the auto function doesn’t work and the set number of pixels and/or % command does not work well when the screen size is reduced. I figure that the solution to one of these problems will help my solve the other. Thanks in advance!
My website is southsawmill.com
- The topic ‘Site Title Image will not Center, nor will Nav Menu Bar?’ is closed to new replies.