Doing some study drills atm, playing around with css, well trying to…
so im using url_for to get the link
inside <> i have the following in the head element link rel=“stylesheet” type=“text/css” href="{{ url_for(‘static’, filename=‘style.css’) }}" media=”screen”
i can visit the file i’m pointing to so the browser can see the file i know that’s working.
in the file i have the following
body {
background-color: lightblue;
}
h1 {
color: black;
text-align: center;
}
but nothing changes
i can use the style tags and define it directly in the html file and it works
but not when im linking to the file
i did reload the page and have viewed the element,
everything was as it should be, i could click the link in the dev tools and
get taken to the css file.
i ended up staying up late trying to figure it out, it was really bugging me.
it ended up being the media=‘screen’
possibly since i’m running through a tv maybe?
Ouch, that’s brutal but yes. Don’t use media until you’ve got it working without it, then you can change it for specific sizes and media types. I’m still not sure why a TV wouldn’t be “screen” though but maybe google your TV or the browser and see what it claims to be.
so i got everything styled as i wanted it, i then tried to play around with the media settings.
turns out i can’t define a specific media for this tv
even media=‘tv’ doesn’t work
couldn’t find any specific reference for the tv anywhere, being a chepo brand might not help.
lucky i’m probably going to be the only one looking at it like this
so lesson learnt, it would be safe to say when designing pages with css to use a
computer monitor, then view in each of the main platforms/screen sizes you are
designing for.
That’s super weird. And can you just use the dimensions only to determine the layout properties in media queries? Just say it’s screen, but specify basics about it. Check out this guide:
It gets very in-depth on what you can do, and some of the things are pretty crazy with orientation, resolution, width/height, etc.
The other thing is to just snoop the user agent in the app.py. You should be able to print out the headers of the request objet and look for User Agent, then match that string and just set it as a variable in the HTML output.
And others. Depends on your goals really, but I’ve worked with clients who handcrafted breakpoints and views and it’s was a constant cross-browser testing overhead.
my study nook is behind me and full of crap, we live in a small place.
we have a duel tv setup in the living room mounted on the wall, so i can be doing my thing while the wife is doing hers.
my pc is a custom duel system i built, which connects to both tvs via hdmi, quite fun when we feel like playing a game.
both running windows 10
so currently i would say that i’m running a duel tv setup as monitors, if the wife is home its a single tv/monitor.
the header is below, some of the information i understand what it is telling us.
whould i be looking for clues in the sec-CH-Ua?
or Accept?
these would be the only 2 i cant seam to figure out.
In this case, if you just have a computer attached to a monitor then it’s nothing to do with the TV. I’ll be you just have the dimensions wrong, or other selectors.
I’d try going the other direction. Ditch alllllll the junk on the CSS link and go straight plain old bare. Get it working on your TV without any media or other special settings. I think you’ve simply added too much thinking “it’s a TV” but your browser thinks it’s a monitor.
i ended up starting again with bootstrap, and made no media declarations, now its set to max size / reduces well when i shrink the screen.
by no means perfect but it gets the job done.
what back end code did you use for this comment box?
for my admin back end i wouldn’t mind setting up something like this
so i can see how it turns out as i’m typing.
This here is Discourse and I do not recommend it at all. It’s actually pretty terrible, and it’s also a whole forum. If you want to have a way to write markdown and have it display like they do here then you’ve got to dive into javasript. I’d checkout:
or
or
Make a webpage with those in it and two panels like here. Could be a good exercise to see how you might do a replica of what Discourse is doing. The key is, when the input textarea changes you want to rerun the markdown convert in the display side (the right side here).
that looks like what i’m after, ill have a play with that later i might need to do a bit of light reading of js so i can understand it a little better though.