Home › Forums › CSS › full width if landscape, half width if portrait › Reply To: full width if landscape, half width if portrait
September 12, 2016 at 11:10 pm
#245492
Participant
Thanks for the prompt reply, Beverleyh. Apologies for my belated response.
I’m trying to do this as custom CSS for WordPress. I’ve customised the alignright and alignleft classes to set the image to half the width of the container, and defined a fullwidth class. What I’m doing manually is tagging each landscape image as fullwidth. I now realised I don’t need the half-width, as that’s already working. What I do need is, if I set an image as aligncenter, that it be fullwidth if it’s landscape, i.e. if width > height, or leave it as it is otherwise.
Sense?